html - Centered textbox with an offset label? -
I have a text box centered on a page What I want is to display an error label on the right side, if necessary, And place the focused textbox on the page. The page has a panel, which is focusing the whole page.
& lt; Asp: panel id = "pnlStart" runat = "server" CssClass = "center" & gt; ... ... ... & lt; Tr & gt; & Lt; TD & gt; & Lt; Div & gt; & Lt; Input type = "text" id = "pName" name = "pName" runat = "server" class = "pName" style = "color: # 7A0000; width: 33%;" Value = "Enter your name" onfocus = "inputfocus (this)" onblur = "inputblur (it)" /> & lt; ASP: Labels ID = "pNameValidationLabel" style = "width: 33%;" Name = "pName" runat = "server" text = "* Please enter your name." Class = "pName" view = "wrong" & gt; & Lt; / Asp: Label & gt; & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; On the page load, the text box is properly focused. But when the visibility of the label pNameValidate appears, then it tries to implement both objects in the center.
Text "itemprop =" text "> You can try and add text-alignment: right; for the style tag in element named PN.
Comments
Post a Comment