Is it possible to tell an input style how long to be? <input type=text name=test width=width?
I can't seem to get it to work any ideas/
Thanks
ANthony
Html form
Moderator: General Moderators
Code: Select all
<input type="text" size="30" />- no_memories
- Forum Contributor
- Posts: 145
- Joined: Sun Feb 01, 2004 7:12 pm
- Location: New York City
CSS can do alot for forms.
Style -->
#field1 {
color: #000;
background: #ccc;
border: 1px solid #f00;
height: 25px;
width: 150px;
}
XHTML -->
<input type="text" id="field1" title="Opinion Text Field" />
One thing to note about this method, it's advisable to put a generic size="25" for old browsers (CSS will over ride the size attribute). If you are using the @import rule in CSS 2, it hides all CSS for browsers like NS 4, leaving only text flow and (usually) a generic table layout; unless you are now coding without tables.
Style -->
#field1 {
color: #000;
background: #ccc;
border: 1px solid #f00;
height: 25px;
width: 150px;
}
XHTML -->
<input type="text" id="field1" title="Opinion Text Field" />
One thing to note about this method, it's advisable to put a generic size="25" for old browsers (CSS will over ride the size attribute). If you are using the @import rule in CSS 2, it hides all CSS for browsers like NS 4, leaving only text flow and (usually) a generic table layout; unless you are now coding without tables.