Code Monkey home page Code Monkey logo

gridbox's Introduction

EXPERIMENT 4 - Web-Layout using Gridbox

AIM

To create a weblayout using Gridbox

ALGORITHM

  1. Set up the container to display as a grid with three columns and four rows.
  2. Define the styles for the header, sidebar, main content, and footer divisions, including their grid placement, background colors, padding, and text styles.
  3. Create a header division that spans all three columns.
  4. Create a sidebar division that occupies the first column and second to fourth rows.
  5. Create a main content division that spans the second and third columns and is placed in the second row. Lastly, create a footer division that spans all three columns.

PROGRAM

<!DOCTYPE html>
<html>
<head>
  <style>
    
    body {
      margin: 0;
      padding: 0;
    }

    .container {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-template-rows: auto 1fr auto;
      min-height: 100vh;
    }

    
    .header {
      grid-column: 1 / 4;
      background-color:rgb(116, 211, 130);
      padding: 20px;
      color:black;
      text-align: center;
      font-size: x-large;
    
    }

    .sidebar {
      grid-column: 1 / 2;
      grid-row: 2 / 4;
      background-color:rgba(233, 226, 34, 0.426);
      padding: 20px;
      
    }

    .main-content {
      grid-column: 2 / 4;
      grid-row: 2 / 3;
      background-color:rgb(209, 105, 20);
      padding: 20px;
      color: #000;
    }

    .footer {
      grid-column: 1 / 4;
      background-color: rgb(171, 164, 164);
      padding: 20px;
      color: #FFF;
      text-align: center;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">HEADER</div>
    <div class="sidebar">SIDEBAR</div>
    <div class="main-content">MAIN CONTENT</div>
    <div class="footer">FOOTER</div>
  </div>
</body>
</html>

OUTPUT

image

RESULT

Thus a web-layout using gridbox is implemented.

gridbox's People

Contributors

shavedha avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.