navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

TEXT vs. TEXTAREA?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> TEXT vs. TEXTAREA?
Page: [1]
 
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!
coreybryant

 

Posts: 2422
Joined: 3/17/2002
From: Castle Rock CO USA
Status: offline

 
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:16:11   
Instead of text try using input

_____________________________

Corey R. Bryant
Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog

(in reply to pcguy)
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?

(in reply to coreybryant)
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

(in reply to pcguy)
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.

(in reply to coreybryant)
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!

(in reply to rdouglass)
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

(in reply to pcguy)
pcguy

 

Posts: 124
From: None
Status: offline

 
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:49:14   
Ok,

I'm convinced since there is no selector for only a "text" box, that there is no way to do it without inserting an id or class tag for every text box....

Thanks for all the quick input...(no pun intended) :)

(in reply to coreybryant)
coreybryant

 

Posts: 2422
Joined: 3/17/2002
From: Castle Rock CO USA
Status: offline

 
RE: TEXT vs. TEXTAREA? - 12/7/2005 9:52:48   
the_pm had a couple of other suggestions as well if you have a unique ID attached to each one

_____________________________

Corey R. Bryant
Merchant Accounts | Toll Free Numbers | My Blog | Expression Web Blog

(in reply to pcguy)
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.

(in reply to coreybryant)
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

(in reply to rdouglass)
rdouglass

 

Posts: 9187
From: Biddeford, ME USA
Status: online

 
RE: TEXT vs. TEXTAREA? - 12/7/2005 10:37:42   
quote:

wait for CSS3 and the support of CSS3


and there's always that. :)

Personally, I hate waiting for anything. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to coreybryant)
Tailslide

 

Posts: 5972
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: TEXT vs. TEXTAREA? - 12/7/2005 10:44:16   
Considering IE still isn't supporting CSS2 (1998ish?) properly I wouldn't hold your breath!

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> TEXT vs. TEXTAREA?
Page: [1]
Jump to: 1





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