Latest Post:
Loading...

CSS code template

 



<!DOCTYPE html>

<html lang="en">
<head>
<title>CSS Website Layout</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* Style the header */
.header {
  background-color: #f1f1f1;
  padding: 20px;
  text-align: center;
}

/* Style the top navigation bar */
.topnav {
  overflow:hidden;
  background-color: #333;
}

/* Style the topnav links */
.topnav a {
  float: left;
  display: block;
  color: #f2f2f2;
  text-align: center;
  padding: 14px 85px;
  text-decoration: none;
}

/* Change color on hover */
.topnav a:hover {
  background-color: #ddd;
  color: black;
 
}

/* Create three equal columns that floats next to each other */
.column {
  float: left;
  width: 33.33%;
  padding: 15px;
}

/* Clear floats after the columns */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Responsive layout - makes the three columns stack on top of each other instead of next to each other */
@media screen and (max-width:600px) {
  .column {
    width: 100%;
  }
}
</style>
</head>
<body>

<div class="header">
  <h1 style="font-size: 50; font-family: Georgia, 'Times New Roman', Times, serif;">Vindhya Vasini Secondary School</h1>
  <p style="font-size: 25px;">Resize the browser window to see the responsive effect.</p>
</div>

<div class="topnav">
  <a href="#">Home</a>
  <a href="#">Contact US</a>
  <a href="#">Gallery</a>
  <a href="#">About Us</a>
  <a href="#">Faculty</a>
  <a href="#">Location</a>
</div>

<div class="row">
  <div class="column">
    <h2>About Computer</h2>
    <p>In computing, an input device is a piece of equipment used to provide data and control signals to an information processing system, such as a computer or information appliance.The computer will then display or reproduce that information via one or more output devices. It’s therefore essential for computer users to differentiate between input and output devices.</p>
  </div>
 
  <div class="column">
    <h2>Column</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique. Quisque vehicula, risus eget aliquam placerat, purus leo tincidunt eros, eget luctus quam orci in velit. Praesent scelerisque tortor sed accumsan convallis.</p>
  </div>
 
  <div class="column">
    <h2>Column</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas sit amet pretium urna. Vivamus venenatis velit nec neque ultricies, eget elementum magna tristique. Quisque vehicula, risus eget aliquam placerat, purus leo tincidunt eros, eget luctus quam orci in velit. Praesent scelerisque tortor sed accumsan convallis.</p>
  </div>
</div>

</body>
</html>

Post a Comment