chasethemetal Posted January 21, 2012 Share Posted January 21, 2012 Hey Guys, I am trying to figure out how to have the outer div's width and height equal 100%, while the inner div's width and height are 100% minus a 10px padding around the whole inner centered horizontally and vertically. I just can't seem to make it work. The outer div would have a black background while the inner div would have a grey background, making a 10px black border around the grey area no matter the size of the window it's in. Any help would be appreciated. Link to comment Share on other sites More sharing options...
dsonesuk Posted January 21, 2012 Share Posted January 21, 2012 html, body {height:100%; margin:0; padding:0;}.outer { min-height: 100%; position:relative; background-color:#000;}.inner{ margin:10px; background-color:#666; position:absolute; top:0; left:0; right:0; bottom:0;} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.