How to Create 3 Column Web Template

Submitted by: 
Language: 
Visitors have accessed this post 1357 times.

Hello, dear developers. I have developed this source code to demonstrate how to code a three column layout website design. I have used external Cascading Style Sheet.

This Template contains one HTML file called index.html and one CSS file called style.css
Download and use for free. Take a look for the source code.

Markup Code

  1. <!-- Content Section -->
  2. <section class="container">
  3. <section class="left-bar">
  4. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eget consectetur nulla. Suspendisse molestie vitae ante eget varius. Integer neque odio, ullamcorper quis sodales vitae, blandit vel lacus. In auctor eget tortor id tristique. Nulla maximus dui aliquam magna tristique, eu vehicula magna consectetur. Integer scelerisque felis est, ut blandit eros sollicitudin ut. Donec justo sem, interdum ac vehicula sit amet, semper sed metus. Fusce a arcu augue. Nulla justo lacus, iaculis non vehicula id, tristique eu nisi. Ut lacinia at mauris non sodales. Phasellus eu lacus scelerisque, lacinia dolor in, laoreet ipsum. Suspendisse aliquet nibh sit amet tortor molestie gravida. Praesent leo ante, vestibulum ut faucibus imperdiet, lacinia in erat. Maecenas lobortis, nisi vitae sodales pellentesque, ex elit finibus leo, quis pharetra nunc massa a libero. </p>
  5. </section>
  6.  
  7. <section class="mid-bar">
  8. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eget consectetur nulla. Suspendisse molestie vitae ante eget varius. Integer neque odio, ullamcorper quis sodales vitae, blandit vel lacus. In auctor eget tortor id tristique. Nulla maximus dui aliquam magna tristique, eu vehicula magna consectetur. Integer scelerisque felis est, ut blandit eros sollicitudin ut. Donec justo sem, interdum ac vehicula sit amet, semper sed metus. Fusce a arcu augue. Nulla justo lacus, iaculis non vehicula id, tristique eu nisi. Ut lacinia at mauris non sodales. Phasellus eu lacus scelerisque, lacinia dolor in, laoreet ipsum. Suspendisse aliquet nibh sit amet tortor molestie gravida. Praesent leo ante, vestibulum ut faucibus imperdiet, lacinia in erat. Maecenas lobortis, nisi vitae sodales pellentesque, ex elit finibus leo, quis pharetra nunc massa a libero. </p>
  9.  
  10. <a href="<a href="http://www.sourcecodester.com"><p><img" rel="nofollow">http://www.sourcecodester.com"><p><img</a> style="width:487px; border:1px solid gray;" src="ad2.png"/></p></a>
  11.  
  12. <p>Praesent quam nisl, pulvinar sit amet dui a, porttitor pharetra magna. Curabitur eu fringilla nisl. Nunc iaculis est in libero placerat, pharetra varius orci semper. Sed a sollicitudin lectus. Nulla efficitur augue sed ipsum venenatis, quis rhoncus ante ultrices. Maecenas ut accumsan augue. Maecenas faucibus neque consectetur diam ullamcorper, et commodo purus semper. Sed a ipsum nisl. </p>
  13.  
  14. <p>Nam tempus tincidunt ligula, eu lobortis leo mollis sed. Aliquam rutrum libero ac lorem pharetra, eget tempor massa gravida. Mauris magna mi, tristique convallis efficitur vel, dapibus eu metus. Donec quam elit, viverra ac magna non, faucibus dignissim leo. Quisque at consectetur sapien, at sodales massa. Aliquam risus leo, pretium vitae cursus id, faucibus volutpat orci. Proin condimentum tellus id enim semper, vitae facilisis diam dictum. </p>
  15. </section>
  16.  
  17. <section class="right-bar">
  18. <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eget consectetur nulla. Suspendisse molestie vitae ante eget varius. Integer neque odio, ullamcorper quis sodales vitae, blandit vel lacus. In auctor eget tortor id tristique. Nulla maximus dui aliquam magna tristique, eu vehicula magna consectetur. Integer scelerisque felis est, ut blandit eros sollicitudin ut. Donec justo sem, interdum ac vehicula sit amet, semper sed metus. Fusce a arcu augue. Nulla justo lacus, iaculis non vehicula id, tristique eu nisi. Ut lacinia at mauris non sodales. Phasellus eu lacus scelerisque, lacinia dolor in, laoreet ipsum. Suspendisse aliquet nibh sit amet tortor molestie gravida. Praesent leo ante, vestibulum ut faucibus imperdiet, lacinia in erat. Maecenas lobortis, nisi vitae sodales pellentesque, ex elit finibus leo, quis pharetra nunc massa a libero. </p>
  19. <p>Mauris pharetra ipsum ut felis egestas, id vulputate felis ultrices. Integer facilisis ut turpis sit amet aliquam. Donec sed massa a purus placerat iaculis eget vel dolor. Cras pharetra sed ante non rutrum. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nam rutrum mi vitae massa tincidunt, vel cursus arcu euismod. Integer et dolor quam. Ut tincidunt dolor lorem, sed suscipit tortor ornare vitae. Aliquam vel vulputate metus, et vulputate mi. Nulla et faucibus justo. Integer in quam viverra, suscipit ipsum nec, suscipit dui. Ut malesuada felis vel nisl venenatis sodales.</p>
  20.  
  21. </section>
  22. </section>
  23. <!-- Content Section End-->

And, this is the CSS style of this tutorial. You can customize the style after you download the source code.

  1. *{
  2. margin:0;
  3. padding:0;
  4. cursor:default;
  5. font-size:14px;
  6. }
  7.  
  8. a
  9. {
  10. text-decoration:none;
  11. cursor:pointer;
  12. }
  13.  
  14. body
  15. {
  16. background-color:#e0e0eb;
  17.  
  18. }
  19.  
  20. header
  21. {
  22. background-color:#666699;
  23. color:#fff;
  24. padding:10px;
  25. }
  26.  
  27. header a
  28. {
  29. color:#fff;
  30. font-size:22px;
  31. }
  32.  
  33. footer
  34. {
  35. background-color:#444;
  36. color:#fff;
  37. padding:10px;
  38. text-align:center;
  39. }
  40.  
  41. footer a
  42. {
  43. color:#fff;
  44. }
  45.  
  46. .container
  47. {
  48. width:1000px;
  49. margin:auto;
  50. padding:5px;
  51. }
  52.  
  53. .left-bar
  54. {
  55. width:190px;
  56. height:555px;
  57. background-color:#f0f0f5;
  58. border:1px solid #b3b3cc;
  59. float:left;
  60. margin:3px;
  61. padding:5px;
  62. }
  63.  
  64. .mid-bar
  65. {
  66. width:490px;
  67. height:555px;
  68. background-color:#f0f0f5;
  69. border:1px solid #b3b3cc;
  70. margin:3px;
  71. margin-left:215px;
  72. padding:5px;
  73. }
  74.  
  75. .mid-bar p
  76. {
  77. margin-bottom:10px;
  78. }
  79.  
  80. .right-bar
  81. {
  82. width:290px;
  83. height:555px;
  84. background-color:#f0f0f5;
  85. border:1px solid #b3b3cc;
  86. margin:3px;
  87. margin-left:727px;
  88. margin-top:-570px;
  89. padding:5px;
  90. }

So what can you say about this work? Share your thoughts in the comment section below. Practice Coding. Thank you very much.


Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3>
  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.