Forum Moderators: not2easy

Message Too Old, No Replies

Fieldsets border-color

Trying to discover a fieldset's border color

         

JaOtEaY

10:15 pm on Aug 11, 2004 (gmt 0)

10+ Year Member



Basically I am trying to determine how a fieldset is constructed.

This came about because we noticed that fieldsets border colors change depending on a users Windows Color Scheme.
I use the silver and so my fieldset were a different color than another developer that used the blue, or olive.
We decided that we liked the way that the silver looked so I tried to track down.

Here is where things get confusing...

I made the fieldest big, and left the rest of the settings alone.
i.e.

#theFieldset{
border-width: 30px;
}

It has two colors in it, a grey and a white. I discovered that by setting a border-style=groove, it
would give this appearance, so I just needed to figure out the color. I put the border-style to solid,
and it became white.

I then looked at some javascript options like:
var bdColor = document.getElementById('theFieldset').currentStyle.getAttribute('borderColor');

this told me that the color is white. but when I set the fieldest's border-color to white, it has
black and white, not grey and white at a large size. And looks really wrong at a small size.

I'm guessing that the color is something along the lines of the windows buttonColor or something like
that.

Anyone know for sure? Or know a way to see what the default settings for things like the fieldset's border is?

--Joey

Krapulator

11:39 pm on Aug 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Interesting quetion! I've now spent the good part of an hour playing around with the different variations of css properties and different browsers for the groove border to see what I could come up with.

On IE6 on my machine, the alternate color is always black.

The CSS3 spec seems to describe the behavior accurately for Firefox and Opera:

This is typically achieved by creating a "shadow" from two colors that are slightly lighter and darker than the 'border-color'.

If you find a way to control both colors, I would be extremely curious to hear it.

JaOtEaY

4:56 pm on Aug 12, 2004 (gmt 0)

10+ Year Member



Your alternate color is always black? So if you just change the border-width, I get a grey and a white. I'm also using the Silver Windows Color Scheme...

--Joey

JaOtEaY

5:12 pm on Aug 12, 2004 (gmt 0)

10+ Year Member



Also,
I noticed that this has nothing to do with fieldsets, it's just a border with a groove question...