Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / November 2003



Tip: Looking for answers? Try searching our database.

Defining width and height of text boxes with CSS

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anna - 24 Nov 2003 15:48 GMT
Hi all.
I have a text box:
<input type="text" size="36"/>
and a textarea:
<textarea rows="3" cols="26"></texarea>
and I use these in several pages.

Is there a way to define the sizing of the text box and textarea in css,
so that if I will need to change them, I will be able to change it just
in the stylesheet, instead of changing every single occurence of these in html?

Thank you very much for help.

Anna
Anne van Kesteren - 24 Nov 2003 15:50 GMT
> Hi all.
> I have a text box:
[quoted text clipped - 6 lines]
> so that if I will need to change them, I will be able to change it just
> in the stylesheet, instead of changing every single occurence of these in html?

Yes. You'll have to apply display:block; to these elements if I remember
correctly.

> Thank you very much for help.
>
> Anna

Signature

 Anne van Kesteren
 <http://www.annevankesteren.nl/>

Brian - 24 Nov 2003 16:20 GMT
> I have a text box: <input type="text" size="36"/> and a textarea:
> <textarea rows="3" cols="26"></texarea> and I use these in several
[quoted text clipped - 4 lines]
> change it just in the stylesheet, instead of changing every single
> occurence of these in html?

In html 4.01 strict, you must define rows and columns attributes for
the textarea element, so you cannot *replace* them using css.
However, you can set sizes in css using width and height attributes.
Be careful not to force horizontal scrolling when doing so.

Signature

Brian
follow the directions in my address to email me

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.