box–width
This is test box1, to see how wide this box will be in various browsers.
This box should be 250px wide, border to border.
This is test box2, testing a css–3 declaration.
code for both boxes
div#box, div#box2 {
color:#222;
background: #efefef;
border: 5px solid #333;
padding: 20px;
margin: 20px;
}
code for box1 — using the SBMH
div#box1 {
div#box1 { width: 200px;}
div#box1 { \width: 250px;}
div#box1 { w\idth: 200px;}
code for box2 — using a ccs–3 declaration
div#box2 {
width: 250px;
box-sizing: border-box;
-moz-box-sizing: border-box;
code for both boxes
div#box, div#box2 {color:#222;background: #efefef;border: 5px solid #333;padding: 20px;margin: 20px;}code for box1 — using the SBMH
div#box1 {div#box1 { width: 200px;}div#box1 { \width: 250px;}div#box1 { w\idth: 200px;}}code for box2 — using a ccs–3 declaration
div#box2 {width: 250px;box-sizing: border-box;-moz-box-sizing: border-box;}Comments