Skip to content

Instantly share code, notes, and snippets.

@AdamAlinauskas
Created February 4, 2013 04:28
Show Gist options
  • Save AdamAlinauskas/4705026 to your computer and use it in GitHub Desktop.
Save AdamAlinauskas/4705026 to your computer and use it in GitHub Desktop.
Web page layout using divs with a header, footer, right sidebar, left sidebar and an area for main content.
<html>
<head>
<style>
#header{
background-color: lightblue;
width:100%;
height:50px;
text-align: center;
}
#sidebar-left{
float:left;
width:15%;
background-color: red;
}
#main{
float:left;
width:70%;
background-color: lightgray;
}
#sidebar-right{
float:left;
width:15%;
background-color: red;
}
#footer{
clear:both;
height: 50px;
width: 100%;
text-align: center;
background-color: lightblue;
}
#sidebar-left, #main, #sidebar-right{
min-height: 600px
}
</style>
</head>
<body>
<div id="header">Header</div>
<div id="sidebar-left">Left</div>
<div id="main">Main</div>
<div id="sidebar-right">Right</div>
<div id="footer">Footer</div>
</body>
</html>
@valcaro87
Copy link

thank you. this is a straight-forward easy to understand html/css basic design.

@Glory93
Copy link

Glory93 commented Sep 18, 2020

this is really great, but i have a question, how do i add borders on my layout?

@banbri-hub
Copy link

thanks for sharing is caring

@bonniventure
Copy link

woooow!!!! very nice

@miladmofidi
Copy link

Thanks bro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment