Click to See Complete Forum and Search --> : Border properties


Ascendancy
02-25-2007, 10:14 AM
I am trying to declare the border for the bottom, right, and left sides, but not the top. I know that I can do something like this:


border-bottom: #4D4D4D 1px solid; border-left: #4D4D4D 1px solid; border-right: #4D4D4D 1px solid;


But is there a way that i can declare them all in one change such as something like


border-bottom,right,left: #4D4D4D 1px solid;


^^I already tried that and it didn't work, but you understand what I mean.

Jeff Mott
02-25-2007, 10:22 AM
Probably the best you can do is to declare a border for all sides and then remove the top border.border: #4D4D4D 1px solid; border-top-style: none

Edit:
The CSS validator may issue a warning about this code. It will tell you that the border-top-style is being redefined, which it is. Remember that it is only a warning. A warning is the validator's way of saying, "This looks fishy. I think you should double-check it and make sure that you really meant to do that." Since it is indeed what we meant to do in this case, we can ignore the warning.

Ascendancy
02-25-2007, 10:30 AM
Yea that's much simpler, thank you.