Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
95
rated 0 times [  102] [ 7]  / answers: 1 / hits: 15233  / 12 Years ago, fri, december 14, 2012, 12:00:00

I have this structure:



<body>

<div id=header>..</div>

<div id=content>..</div>

<div id=footer>..</div>

</body>


And this CSS:



body {
color: white;
font-family: 'Play', sans-serif;
max-width: 2560px;
margin: 0 auto;
min-width: 960px;
height:100%;
padding:0;
}



#header {
position: relative;
overflow: hidden;
margin: 0 auto;
min-width: 960px;
height: 95px;
background-image: url(../images/header-bg.png);
}

#content {
margin: 0 auto;
position: relative;
max-width: 1600px;
height:100%;
overflow:hidden;
}

#footer {
background-color: #009EDB;
background-image: url(../images/footer-bg.png);
bottom: 0;
height: 30px;
margin: 0;
position: relative;
width: 100%;

}​


But not body height 100% of browser windows. What's my problem? Thanks.



jsFiddle


More From » html

 Answers
14

Add:



html {
height: 100%;
}


To your CSS.



See update here - http://jsfiddle.net/xkTpV/4/


[#81419] Thursday, December 13, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mackenzihannal

Total Points: 548
Total Questions: 96
Total Answers: 96

Location: Lithuania
Member since Fri, Sep 4, 2020
4 Years ago
;