Click here to Skip to main content
15,899,937 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i tried this but that displays text "eg:0092" below the textbox but not in the centre

HTML
<input type="text" name="cc" value="Contry Code" onfocus="removeCaption(this);"/>

HTML
<div id="eg" style="display:block"> eg:0092     eg:21</div>
Posted

1 solution

Don't even play with the idea to do it not using CSS sheets. By the way, you display style does nothing because div is already block by default. Use the property "text-align: center".

See:
http://www.w3.org/TR/CSS2/text.html[^],
http://www.w3.org/TR/CSS2/box.html[^].

—SA
 
Share this answer
 
v2
Comments
Amir Mahfoozi 4-Dec-11 7:25am    
+5 I agree with you.
Sergey Alexandrovich Kryukov 4-Dec-11 9:51am    
Thank you, Amir.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900