Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>CSS Website Layout</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  7. <style>
  8. * {
  9. box-sizing: border-box;
  10. }
  11.  
  12. body {
  13. margin: 0;
  14. }
  15.  
  16. /* Create three equal columns that floats next to each other */
  17. .column {
  18. float: left;
  19. width: 33.33%;
  20. padding: 15px;
  21. }
  22.  
  23. /* Clear floats after the columns */
  24. .row:after {
  25. content: "";
  26. display: table;
  27. clear: both;
  28. }
  29.  
  30. /* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
  31. @media screen and (max-width:600px) {
  32. .column {
  33. width: 100%;
  34. }
  35. }
  36. </style>
  37. </head>
  38. <body>
  39.  
  40. <div class="row">
  41. <div class="column">
  42. <h2>Column</h2>
  43. <p>college details.</p>
  44. </div>
  45.  
  46. <div class="column">
  47. <h2>Column</h2>
  48. <p>image here.</p>
  49. </div>
  50.  
  51. <div class="column">
  52. <h2>Column</h2>
  53. <p>college activities.</p>
  54. </div>
  55. </div>
  56.  
  57. </body>
  58. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement