On Mon, 09 May 2005 15:14:42 -0700, you wrote:
>Do you see any utility in putting FormBuilder field labels inside of
><th> elements to allow better style control? Here's what I'm thinking
>right now:
I used to know a lot about CSS, but take my advice with a grain of
salt, because it got so frustrating working with it I gave up on
seriously studying it. I know enough to get it to do what I want, but
not best practices or CSS2 anymore.
I've been through several cycles of bugginess with the idea of using
the container to select the styles. Browser have changed their
interpretation and implementation of how styles inherit or are
selected when you use tables as selectors and containers.
So in theory, I would agree, that
table.myform th {}
or
th.myform {}
would do it, I'm not sure of it, and tend to just set a unique name
class on each type of element
.form_hed {}
.form_data{}
for TH and TD cells
Another thing to be careful of is input elements. Submit and Reset
inputs are inputs, but are special cases. If you just set a style on
input { }
you're going to mess up the default styles on buttons. And some of
these look awful and shouldn't look the same as text inputs (unless
you want to confuse users or are designing forms for Martians).
So you need
input.submit
input.reset
or just
.submit {}
although that could potentially match some other usage, so the first
idea is more defensive.
You're going to need to style SELECT menus.
These can be tricky, because (and I'm not sure what the spec has to
say about this) SELECT and OPTION are not necessarily dependent on
each other. Suppose you set a style for each option
option { font-weight: bold }
The unselected menu or the selected item when open, does not take the
style on OPTION, it actually takes the style on SELECT. So you'd have
to
select { font-weight: bold }
I don't know if this is a browser quirk or not. But if I remember,
Firefox was doing this.
Anyway, I hope I helped, and if I harmed, chalk it up to my allergies
making me woozy today.
Steve
>
>This would allow a stylesheet to say something like this (thanks Norton):
>
> table.myform {}
> table.myform tr {}
> table.myform td {}
> table.myform th {}
Lead Developer
www.folkstreams.net
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|