By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,652 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,652 IT Pros & Developers. It's quick & easy.

wildcards and the case for setting all default styles

P: n/a
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

Jun 27 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Jeff wrote:
>
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 *.
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.
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?
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.
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
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.