Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Sizing input and text area boxes with CSS
Old 08-28-2008, 11:53 PM Sizing input and text area boxes with CSS
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
Is it possible to style these elements with CSS?

Input boxes accept the inline attribute "size='x' " and text area boxes will accept the inline attribute "cols='x' "

but I`m not sure what either of those 'x' values are meant to represent. They are obviously not pixels. Em`s maybe?

At any rate is it possible to set these attributes with a Css style sheet?

I`ve tried using the Css width property but it doesnt seem to take effect.

Last edited by TWD; 08-28-2008 at 11:56 PM..
TWD is online now
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-29-2008, 05:49 AM Re: Sizing input and text area boxes with CSS
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
but I`m not sure what either of those 'x' values are meant to represent.
Character width/height (ems are close enough)

Quote:
At any rate is it possible to set these attributes with a Css style sheet?
No
Rendering of input fields and elements is NOT handled by HTML, it is handled by the underlying OS of the client browser. (Which is why they look different on different OS's)
Some styling can be done, fonts, colours etc but the structure of the input element is pretty much unaffected.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-29-2008, 07:48 PM Re: Sizing input and text area boxes with CSS
TWD
TWD's Avatar
King Spam Talker

Posts: 1,183
Trades: 0
I see.
They must be node elements of the DOM though, right?

In which case, it must be possible to use Javascript to apply some size styling rather than manually change each piece of code.

Is there a JQuery or other framework script that does this? I`ve googled a bit but havent found anything yet. It would be something handy to have.
TWD is online now
Reply With Quote
View Public Profile
 
Reply     « Reply to Sizing input and text area boxes with CSS
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15835 seconds with 12 queries