CSS Layout Fixed-Width - HTML CSS CSS Layout

HTML CSS examples for CSS Layout:Layout

Description

CSS Layout Fixed-Width

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
body {<!--   w w  w . j  av a  2  s .  co m-->
   background:Chartreuse url('https://www.java2s.com/style/demo/Google-Chrome.png') repeat-y center;
   background:yellow;
   color:blue;
   font:17px/2 Arial;
}

#root {
   background:pink;
   color:OrangeRed;
   margin:0 auto;
   width:1009px;
}
</style> 
 </head> 
 <body> 
  <div id="root">
    Lorem ipsum dolor sit 
  </div>  
 </body>
</html>

Related Tutorials