Here's the shorthand for what you want to do:

.someClass
{
border: 1px solid #CCC;
border-width: 1px 2px 2px 1px; /* top, right, bottom, left */
border-bottom-color: #666;
border-right-color: #666;
}

Obviously if all your borders have the same color you can forget the last 2 
lines, which makes it pretty easy.

Chris



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cole Kuryakin
Sent: 17 April 2008 14:09
To: [email protected]
Subject: [WSG] Shorthand rule for border?


Hello All -

This is something that I've been wondering about for a long time - a shorthand 
rule for borders.

I often find myself in a situation where I have to define a different border 
size and/or color for two (or more) sides of an element so I'm always going 
through the drudgery of:

.someClass

{

border-top: 1px solid #CCC;

border-left: 1px solid #CCC;

border-bottom: 2px solid #666;

border-right: 2px solid #666;

}

Boy, that gets boring (not to mention tedious)... especially if I've got to do 
different rules to yield the same general effect. I've taken a look around the 
web and can't find any reference to some sort of "short-hand" condensation for 
borders (after all, we've got 'em for padding and margins, etc); and then 
again, maybe I'm not putting in the right keywords.

Interested in all enlightenment and/or links.

Cole


Click here<https://www.mailcontrol.com/sr/wQw0zmjPoHdJTZGyOCrrhg==> to report 
this email as spam.

*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************


This message has been scanned for malware by SurfControl plc. 
www.surfcontrol.com


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to