Oct 15, 2011, 7:16 PM
[CLOSED] Text Alignment issue
Hi,
In a web page I want to show some text in center. I am trying to implement that using 'div' tags but not working properly. Is there any best way to show text align at center always based on window re-size. Please check the code and I need the text should display as in attachment.
In a web page I want to show some text in center. I am trying to implement that using 'div' tags but not working properly. Is there any best way to show text align at center always based on window re-size. Please check the code and I need the text should display as in attachment.
<%@ Page Language="VB" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%">
<head id="Head1" runat="server">
<title>Untitled</title>
<script runat="server">
</script>
</head>
<body style="height: 100%; background-color: #d9d9d9;">
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Viewport ID="vpLogin" runat="server" Layout="Center">
<Items>
<ext:Panel ID="pnlHeader" runat="server" Height="25" Title="" BodyStyle="background-color:#d9d9d9;"
Html="<div id='header' style='float:middle;margin-top:5%;margin-left:32%;'><font style='font-family: Tahoma; font-size: 42px; color: #A8A8A8'>My Company Name</font></div><div id='header2' style='float:middle;margin-top:5%;margin-left:32%;'><font style='font-family: Tahoma; font-size: 24px; color: #A8A8A8'>Sub text goes here...</font></div>">
<CustomConfig>
<ext:ConfigItem Name="width" Value="100%" Mode="Value" />
</CustomConfig>
<Items>
</Items>
</ext:Panel>
<ext:BoxComponent ID="bxComp1" Height="200" runat="server">
</ext:BoxComponent>
<ext:Label ID="lblMessage" runat="server" Text="Upload Your Loan Documents Here"
AnchorHorizontal="100%" Height="20">
</ext:Label>
<ext:Window ID="Window1" runat="server" Closable="false" Resizable="false" Height="170"
Icon="Lock" Title="Login" Draggable="false" Width="350" Modal="false" Padding="5"
Layout="Form" ButtonAlign="Center">
<Items>
<ext:TextField ID="txtUsername" runat="server" ReadOnly="false" FieldLabel="Username"
AllowBlank="false" BlankText="Your username is required." Text="" LabelWidth="120" />
<ext:TextField ID="txtPassword" runat="server" ReadOnly="false" InputType="Password"
FieldLabel="Password" AllowBlank="false" BlankText="Your password is required."
Text="" LabelWidth="120" />
<ext:LinkButton ID="lnkForgotPassword" runat="server" Text="Forgot Password" AnchorPoint="Right"
eldLabel="">
</ext:LinkButton>
<ext:Checkbox ID="chkRemember" runat="server" BoxLabel="Remember Me">
</ext:Checkbox>
</Items>
<Buttons>
<ext:Button ID="btnLogin" runat="server" Text="Login" Icon="Accept">
<Listeners>
<Click Handler="
if (!#{txtUsername}.validate() || !#{txtPassword}.validate()) {
Ext.Msg.alert('Error','The Username and Password fields are both required');
// return false to prevent the btnLogin_Click Ajax Click event from firing.
return false;
}" />
</Listeners>
</ext:Button>
</Buttons>
</ext:Window>
</Items>
</ext:Viewport>
</form>
</body>
</html>
Last edited by Daniil; Oct 20, 2011 at 6:36 PM.
Reason: [CLOSED]