Posted By

icecreamboyy on 02/22/11


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

wirenaught


CSS layout Three columns and a Header


 / Published in: CSS
 

URL: css html

  1. <html>
  2. <head>
  3. <title>Three Column CSS Layout with Header</title>
  4. <style type="text/css">
  5.  
  6. body
  7. { margin-top: 0;
  8. margin-bottom: 0;
  9. margin-left: 0;
  10. margin-right: 0;
  11. padding-left: 0;
  12. padding-right: 0;
  13. }
  14.  
  15. #header {
  16. margin: 20px;
  17. padding: 10px;
  18. height: 100px;
  19. }
  20. #left {
  21. position: absolute;
  22. left: 15px;
  23. top: 160px;
  24. width: 200px;
  25. }
  26. #center {
  27. top: 0;
  28. margin-left: 230px;
  29. margin-right: 230px;
  30. }
  31. #right {
  32. position: absolute;
  33. right: 15px;
  34. top: 160px;
  35. width: 200px;
  36. }
  37. </style>
  38. </head>
  39.  
  40. <body>
  41.  
  42. <div id="header">
  43.  
  44. Your header will go here. You can place images, text links, etc. in this div. To change the properties of this div you can change the #header selector in the style sheet that is located on this page between the head tags.
  45.  
  46. </div>
  47.  
  48. <div id="left">
  49.  
  50. Your left menu will go here. You can place images, text links, etc. in this div. To change the properties of this div you can change the #left selector in the style sheet that is located on this page between the head tags.
  51.  
  52. </div>
  53.  
  54.  
  55. <div id="center">
  56. All of your content goes in this div. This section is fluid so that if the window is collapsed, your div will collapse also and fit the screen perfectly. To change the properties of this div you can change the #center selector in the style sheet that is located on this page between the head tags.
  57. </div>
  58.  
  59. <div id="right">
  60.  
  61. Your right menu will go here. You can place images, text links, etc. in this div. To change the properties of this div you can change the #right selector in the style sheet that is located on this page between the head tags.
  62.  
  63. </div>
  64.  
  65. </body>
  66. </html>

Report this snippet  

You need to login to post a comment.