|
| |
|
|
pcguy
Posts: 124 From: None Status: offline
|
TEXT vs. TEXTAREA? - 12/7/2005 9:13:39
Is there any way to affect ALL the "text" input areas (without affecting anything else) by using a tag like this: INPUT { font-size: 10px; font-family: Arial, Helvetica, sans-serif; } TEXTAREA { font-size: 10px; font-family: Arial, Helvetica, sans-serif; } Obviously, this doesn't work: TEXT { font-size: 12px; font-family: Arial, Helvetica, sans-serif; } I want to avoid using .mytextbox, because then I have to insert a class tag into each text input box... Any help appreciated!
|
|
|
|
pcguy
Posts: 124 From: None Status: offline
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:18:00
INPUT will affect ALL the input types, including checkboxes, textareas, etc... I only want to affect TEXT inputs... Maybe there is no way to do it without using a class tag?
|
|
|
|
coreybryant
Posts: 2422 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:25:06
Sorry about that, I knew that but just got back in from shovelling snow :) As far as I know, the answer is no. Of course, you could over-ride it in your CSS by applying a class to the other tags if the text boxes are more than the others to reduce the code
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog
|
|
|
|
rdouglass
Posts: 9187 From: Biddeford, ME USA Status: online
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:31:56
quote:
INPUT will affect ALL the input types, including checkboxes, textareas, etc... I only want to affect TEXT inputs... I kinda' get around that by applying a style to INPUT then apply a style to TEXTAREA afterwards to override the INPUT style. Seems to work good for me. I don't have to use class tags and I get the effect I want - textboxes different than textareas.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
pcguy
Posts: 124 From: None Status: offline
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:35:51
quote:
I kinda' get around that by applying a style to INPUT then apply a style to TEXTAREA afterwards to override the INPUT style Ok, but how would you do it for a TEXT input box??? Textarea has a CSS selector (or whatever you call it), a Textbox does not (that I know of)... So if I do an INPUT style, what do I put after it that will affect only TEXT boxes (not textarea boxes) ??? Thanks!
|
|
|
|
coreybryant
Posts: 2422 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:39:26
You would need to give the apply that <style type="text/css">
input.text
{
border:1px solid #000;
background-color: #000;
font-family: arial;
font-size: 10pt;
color: #fff;
}
</style> I also asked here: Controlling the Input with CSS just in case they might have a few ideas.
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog
|
|
|
|
rdouglass
Posts: 9187 From: Biddeford, ME USA Status: online
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 10:02:57
quote:
Ok, but how would you do it for a TEXT input box??? Textarea has a CSS selector (or whatever you call it), a Textbox does not (that I know of)... Exactly. The INPUT style affects textboxes as well as all other INPUT, yes. So I put my INPUT style first, then TEXTAREA to offset the INPUT. DO the same with CHECKBOX, BUTTON, and whatever other INPUT items you need to. I know it doesn't seem efficient but if you have a large form (or lots of them) it can be more efficient thatn using class in the tag. And you're right, you can't use the TEXT input item explicitly. That's the only workaround I'm aware of.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
coreybryant
Posts: 2422 Joined: 3/17/2002 From: Castle Rock CO USA Status: offline
|
RE: TEXT vs. TEXTAREA? - 12/7/2005 10:27:35
Or as they point out - wait for CSS3 and the support of CSS3
_____________________________
Corey R. Bryant Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|