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>
@softgandhi
Copy link

Its a good step to start a new project. It would be great if you add css flex version of the same.

@ofurogbe
Copy link

I need a mentor to guide me through web design

@ErdinBlaze29
Copy link

thanks dude, it's work

@horpsy-web
Copy link

thanks

@AHAMES
Copy link

AHAMES commented Aug 14, 2018

thank you for the great layout, it is really helpful, but is there a way to fix the footer down and extend the sidebar to the bottom?

@Bablu07
Copy link

Bablu07 commented Aug 22, 2019

awesome

@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