On Sat, 2 Jun 2007, skip evans wrote:

> A client site I'm doing some maintenance on has a bunch
> of input statements like this:
>
> <input type="text" name="board_name" size="50" value="">

What's the URL?

> ...and I thought I could apply a style to all of them,
> without having to go back and inserting class="something"
> to all of these forms by using:
>
> input {
>      font-family: Arial, Helvetica, sans-serif;
>      border: 1px solid #000000;
>      color: #000000;
>       font-weight: normal;
>       font-size: 11px;
> }
>
> ...but this has no affect.

It surely affects the rendering - with the usual CSS Caveats, but they 
mostly don't apply here.

Modern browsers generally implement the effects suggested in that style 
sheet. Some rather old browsers may ignore some of them. Moreover, for 
example, if a user has set a minimum font size on Firefox, you won't be 
able to get below it, and it may well be larger than 11px.

Whether the effect is useful is a different thing. We don't like font size 
wars in this list, but the fact still is that font-size: 11px will 
introduce a serious problem.

To get help with the technical issue, you would need to specify a URL of 
your test page and to list the browser(s) you tested it on.

> I also tried
>
> input.text {
>
> but that had no affect either.

Of course not, since you have no class="text" attribute. Using 
the selector input[type="text"] instead of just input would _restrict_ the 
rule to input elements with an (explicit) attribute type="text", though 
this is not supported in IE 6, so it's not a good move in practice. And 
it would _restrict_ the applicability.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to