Tuesday, August 25, 2009

Shorthand

style type="text/css">
div#box {
width:300px;
height:300px;
background-color:#99f;
padding-left:>100px;
padding ....
}
/style>
/head>

body>
div id="box">content /div>
/body>


Shorthand
Padding goes - top right bottom left - top clockwise
padding: 100px 140px; = 100px top and bottom & 140px right and left
margins have same principal
border-width same principal
border-style same principal
border-color same principal



style type="text/css">
div#box {
width:300px;
height:300px;
background-color:#99f;
padding:100px 110px 120px 140px;
margin:10px 20px 30px 40px;
border-style:solid dotted dashed double;
border-width:1px 2px 3px 4px;
border-color:green yellow blue black
}
/style>
/head>

body>
div id="box">content /div>
/body>

No comments:

Post a Comment