HighDots Forums  

wildcards and the case for setting all default styles

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss wildcards and the case for setting all default styles in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff
 
Posts: n/a

Default wildcards and the case for setting all default styles - 04-16-2008 , 09:38 AM






I tend to be a bit behind the times, sometimes a generation further
that I want.

So, I've been thing about the "*" selector. I've noticed that unlike
body, it styles form fields and form elements. Unless I'm missing
something here, it seems like setting a wildcard font-family and perhaps
color is a good thing. I'm not sure what else you'd default with that
as setting % sizes,margins and borders on everything would be a mess.

The question for me is: What about taking form fields out of
monospace? Unless you have some wild body font, why not have them the
same font family as the body text?

Perhaps something like this:

<style type="text/css">
*{font-family: Tahoma, Geneva, sans-serif}
body{color: #234567}

#form_table{width: 500px
... border stuff
}
#form_table tr td:first-child{
text-align: right;
width: 10em;
padding-right: 1em;
}

input{width: 100%}
</style>

....

<table id="form_table">

<tr><td><label for="field 1">Field 1</label></td><td><input type="text"
size="4" name="field_1"></td></tr>

....

We all write a lot of forms, and I'm just trying to get some idea of
the state of the form. What styling gets in the way of usability? I'd
like to move beyond plain jane.

Jeff


Reply With Quote
  #2  
Old   
Bergamot
 
Posts: n/a

Default Re: wildcards and the case for setting all default styles - 04-16-2008 , 11:07 AM






Jeff wrote:
Quote:
So, I've been thing about the "*" selector. I've noticed that unlike
body, it styles form fields and form elements. Unless I'm missing
something here, it seems like setting a wildcard font-family and perhaps
color is a good thing.
I've found very little use for the * universal selector.

Set your default colors and font styles on the body element, and don't
bother with *.

Quote:
I'm not sure what else you'd default with that
as setting % sizes,margins and borders on everything would be a mess.
Indeed, and is why I don't use it. More often than not you end up having
to over specify everything, which makes the stylesheet unnecessarily
bloated and a pain to maintain.

Quote:
The question for me is: What about taking form fields out of
monospace? Unless you have some wild body font, why not have them the
same font family as the body text?
Why not let them default to what the user is accustomed to seeing?

Quote:
We all write a lot of forms, and I'm just trying to get some idea of
the state of the form. What styling gets in the way of usability?
Pretty much any of it.

Leaving form controls at the browser defaults is best for usability
because that is what the user is accustomed to. I've seen a lot of forms
where the "3d" borders are flattened or some other styling is used to
make them look kewl. Many times this just ends up confusing because they
no longer look like form fields.

Quote:
I'd
like to move beyond plain jane.
Nothing wrong with plain jane as far as forms go, IMO.
Just don't go overboard.

--
Berg


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.