views:

17

answers:

2

I am using VS 2005 and while editing a css border property,

Visual Studio displays following tooltip

border:[border-style][border-width][border-color]|inherit

which means following is valid

border:solid 2px #000

but as per this shorthand cheat sheet

following is valid shorthand

border:2px solid #000

I googled for "css shorthand border" and browsed 2-3 articles which all point that border:2px solid #000 is valid

in VS2005 css version for validation is 2.1

So I am not sure why VS2005 displays the shorthand in different manner?

Are both approaches correct ?

A: 

W3C CSS Validator validates both

Sotiris
A: 

The specification only specifies width | style | color. However I've never had any issue using the way shown in Visual Studio. I'd say they are both pretty safe.

http://www.w3.org/TR/CSS2/box.html#border-properties

eoldre