RE: [WSG] Shorthand for Borders?
russ weakley wrote: > I was wrong! Yeah, but don't worry, I won't rub your nose in it :p > PS. Not supported by IE5/mac, probably others?? The westciv chart gives it the all clear, except for partial support in NS4: http://www.westciv.com/style_master/academy/browser_support/bg_border_margin _padding.html Just for the hell of it, I whipped up a test page (http://lindsay.f2o.org/experiments/css/border-color.html), which works fine in MacIE5 for me. -- Lindsay Evans. Developer, Red Square Productions. [p] 8596.4000 [f] 8596.4001 [w] www.redsquare.com.au * The discussion list for http://webstandardsgroup.org/ *
Re: [WSG] Shorthand for Borders?
Well... When I'm wrong I'm really wrong. It appears to be well supported on recent standards compliant browsers: http://www.browsercam.com/public.aspx?proj_id=42233 Apologies Lindsay! Moral for me: check before posting an answer! Russ :( > I was wrong! > > "The 'border-color' property can have from one to four values, and the > values are set on the different sides as for 'border-width' ." > http://www.w3.org/TR/CSS2/box.html#propdef-border-color > > :( > Russ > > PS. Not supported by IE5/mac, probably others?? > > > >> Ummm... Lindsay... >> >> From my understanding (haven't got time to check at present) there is no >> shorthand for border-color, so you would still have to specify separate >> border-top-color, border-right-color, border-left-color and >> border-bottom-color values. This means you end up with more declarations >> that your original sample. >> >> Could be wrong... >> Russ >> >> >>> border-style: solid; >>> border-width: 1px 2px 3px 4px; >>> border-color: #555 #666 #777 #888; >>> >>> Is probably as short as it gets. >> * The discussion list for http://webstandardsgroup.org/ *
Re: [WSG] Shorthand for Borders?
I was wrong! "The 'border-color' property can have from one to four values, and the values are set on the different sides as for 'border-width' ." http://www.w3.org/TR/CSS2/box.html#propdef-border-color :( Russ PS. Not supported by IE5/mac, probably others?? > Ummm... Lindsay... > > From my understanding (haven't got time to check at present) there is no > shorthand for border-color, so you would still have to specify separate > border-top-color, border-right-color, border-left-color and > border-bottom-color values. This means you end up with more declarations > that your original sample. > > Could be wrong... > Russ > > >> border-style: solid; >> border-width: 1px 2px 3px 4px; >> border-color: #555 #666 #777 #888; >> >> Is probably as short as it gets. > > * > The discussion list for http://webstandardsgroup.org/ > * Thanks Russ --- Russ Weakley Max Design Phone: (02) 9410 2521 Mobile: 0403 433 980 Email: [EMAIL PROTECTED] http://www.maxdesign.com.au --- * The discussion list for http://webstandardsgroup.org/ *
Re: [WSG] Shorthand for Borders?
Ummm... Lindsay... >From my understanding (haven't got time to check at present) there is no shorthand for border-color, so you would still have to specify separate border-top-color, border-right-color, border-left-color and border-bottom-color values. This means you end up with more declarations that your original sample. Could be wrong... Russ > border-style: solid; > border-width: 1px 2px 3px 4px; > border-color: #555 #666 #777 #888; > > Is probably as short as it gets. * The discussion list for http://webstandardsgroup.org/ *
Re: [WSG] Shorthand for Borders?
- Original Message - From: "Stephen" <[EMAIL PROTECTED]> > Is there an easier way (i.e. Shorthand) to declare this type of border > (for example)?: > > border-top: 1px solid #555; > border-right: 2px solid #666; > border-bottom: 3px solid #777; > border-left: 4px solid #888; - Nope. That is already in shorthand. Longhand is like this: border-top-width: 1px; border-top-style: solid; border-top-color: #555; and so on. Please see this: http://www.w3.org/TR/REC-CSS2/box.html#border-properties Simon Jessey -- mail: [EMAIL PROTECTED] blog: http://jessey.net/blog/ work: http://keystonewebsites.com/ * The discussion list for http://webstandardsgroup.org/ *
RE: [WSG] Shorthand for Borders?
Stephen wrote: > Long time listener, first time poster. Hi Stephen :) > Is there an easier way (i.e. Shorthand) to declare this type of > border (for example)?: > > border-top: 1px solid #555; > border-right: 2px solid #666; > border-bottom: 3px solid #777; > border-left: 4px solid #888; border-style: solid; border-width: 1px 2px 3px 4px; border-color: #555 #666 #777 #888; Is probably as short as it gets. It'd be cool (though even potentially even more confusing) if you could do the following: border: 1px 2px 3px 4px solid #555 #666 #777 #888; (I'd hate to be the one writing parsing rules for that sucker :p) -- Lindsay Evans. Developer, Red Square Productions. [p] 8596.4000 [f] 8596.4001 [w] www.redsquare.com.au * The discussion list for http://webstandardsgroup.org/ *