Click to See Complete Forum and Search --> : creating different styles for input tag


olaf
03-23-2004, 07:19 AM
Hallo,

i want to display different styles for different input elements.

I learned something about "Attribute selectors" and started some CSS code like this.

input[type=submit] {
color: #996666;
font-size: 12px;
font-weight: bold;
background-color: #660033;
border: 1px solid #996666;
}

on my page is nothing changed (still the standard button). Strange is that in Dreamweaver's design-view the smaller boldtext is visible.

Anyone an idea what's wrong?

Thanks.

Vladdy
03-23-2004, 07:38 AM
IE does not recognize attribute selectors. Use class to make it work.

olaf
03-23-2004, 08:02 AM
I was afraid about this... (it doesn't work mozilla 1.5 too)

thanks

Vladdy
03-23-2004, 08:09 AM
works fine in rv1.4b (one I have handy). Unless some bug creapt back in 1.5, check your HTML for possible errors and make sure you do not use some outdated DTD - that may have an effect as well...

olaf
03-23-2004, 08:17 AM
Sorry but what means:

rv1.4b


and

outdated DTD ?

Vladdy
03-23-2004, 08:34 AM
There are different browsers based on Gecko engine: Mozilla, Firebird/Firefox and they have different version numbering.
In order to compare apples to apples I did not use the Firebird version I'm using but the Mozilla revision it is based on (it is shown in the client identification string after letters rv:
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
Another way to compare is Gecko release date (05/16/2003).

Outdated DTD are those that put browser and quirks mode. All new sites should be designed in HTML 4.01 STRICT, XHTML 1.0 STRICT or XHTML 1.1 (which is pretty much reformulated XHTML 1.0 STRICT).

olaf
03-23-2004, 12:46 PM
Thanks,

i think i read something like this before...