Topic: Applying styles to text boxes only (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11070" title="Pages that link to Topic: Applying styles to text boxes only (Page 1 of 1)" rel="nofollow" >Topic: Applying styles to text boxes only <span class="small">(Page 1 of 1)</span>\

 
Blaise
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 10-07-2003 08:45

hi guys,

I was wondering if there is a way in a CSS style sheet to write a style specifically for text boxes only, something like input.text{} so whenever I have a text box on a page it will have this style/class automatically applied to it without me having to add class="" or it interfering with other input objects.

TIA

Blaise

kuckus
Bipolar (III) Inmate

From: Berlin (almost)
Insane since: Dec 2001

posted posted 10-07-2003 11:15

There is a way:

input[type="text"] { border: 5px solid green; }

but it is only supported by Mozilla and Opera 7, not by good old IE 6 of course...


kuckus

Blaise
Nervous Wreck (II) Inmate

From:
Insane since: Jun 2003

posted posted 10-08-2003 01:14

oh...

Is this the way of things to come though? I guess it is seeing as Mozilla and Opera support it, have you got a good link to the source of this information?

Cheers

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 10-08-2003 23:56

The CSS3 Specs is to place to find confirmation about that information. The part about attribute selectors are probably what you're looking for.

_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"
- the Golden Ratio -

Rinswind 2th
Maniac (V) Inmate

From: Den Haag: The Royal Residence
Insane since: Jul 2000

posted posted 10-12-2003 13:18

What's wrong with class?




__________________________________________
"Art has to be forgotten. Beauty must be realized."
Piet Mondriaan

Skaarjj
Maniac (V) Mad Scientist

From: :morF
Insane since: May 2000

posted posted 10-12-2003 13:29

or you could just have two styles, one for textboxes (class textbox) and one for everything else. Basically just create an empty style of input { } then create input.textbox { } with your style info for your texboxes...

In the end, until CSS3 is out and supported across the board, you're going have to use classes, becuase attribute selectors just aren't in the CSS tolbox until then.

[This message has been edited by Skaarjj (edited 10-12-2003).]

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 10-12-2003 17:45

rinswind - there's nothing wrong with using a class, of course, but if it could be down without having to bother adding the class="whatever" then all the better.

The tools are there, but the support isn't unfortunately. And with the state of IE, who knows what will happen to standards support in the future.....



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu