Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textboxes inheriting styles 1

Status
Not open for further replies.

jimmyshoes

Programmer
Jun 1, 2008
132
GB
Why is it that textboxes do not seem to inherit styles
For example the following does not work
Code:
<form action="act.cfm"><div style="font-size:24px"><input type="text" value="Value" /></div></form>
The style must be added to the textbox itself
Code:
<form action="act.cfm"><div><input type="text" value="Value" style="font-size:24px"/></div></form>
 
All form controls are rendered by the OS on the client's computer, so they follow a different set of rules than all other elements. Some (OSes) do not allow any styling and others can have everything styled.

As OS controls, they need to have the styling specified separately. Sorry.

___________________________________________________________
[small]Do something about world cancer today: Comprehensive cancer control information at PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top