PDA

View Full Version : extra space under footer to bottom of page


flawlesstwins
10-23-2011, 09:12 PM
I am trying to figure out why i am getting this extra space under the footer in some browsers and not others, it works in firefox and google and IE it has a huge space under the footer to the bottom of the page on the browser. please tell me how to fix this. This is in DW CS5

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Untitled Document</title>

<style type="text/css">

body {

background-color: #CCC;

}

html, body {

padding: 0px;

text-align: center;

margin: 0px;

}

#wrapper {

width: 1024px;

margin-top: 0px;

margin-right: auto;

margin-bottom: 0px;

margin-left: auto;

}

#header {

height: 60px;

width: 1024px;

background-color: #0CDADA;

}

#NavBar {

height: 25px;

width: 1024px;

background-color: #A2ECF0;

}

#content {

height: 450px;

width: 600px;

float: left;

background-color: #FFF;

}

#sidebar {

height: 450px;

width: 424px;

clear: none;

float: right;

background-color: #fff;

}

#footer {

height: 25px;

width: 1024px;

clear: both;

background-color: #A2ECF0;

}

</style>

</head>



<body>

<div id="wrapper">

<div id="header">Content for id "header" Goes Here</div>

<div id="NavBar">Content for id "NavBar" Goes Here</div>

<div id="content">Content for id "content" Goes Here</div>

<div id="sidebar">Content for id "sidebar" Goes Here</div>

<div id="footer">Content for id "footer" Goes Here</div>



</div>

</body>

</html>

flawlesstwins
10-23-2011, 10:12 PM
this is the actual one that is giving me the problem

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
background-color: #CCC;
margin-top: 0px;
margin-bottom: 0px;
margin-right: auto;
margin-left: auto;
}
#wrapper {
width: 1024px;
margin-top: 0px;
margin-right: auto;
margin-bottom: 0px;
margin-left: auto;
height: 100%;
}
#header {
height: 100px;
width: 1024px;
background-color: #939;
}
#NavBar {
height: 25px;
width: 1024px;
}
#content {
height: 450px;
width: 600px;
float: left;
}
#sidebar {
height: 450px;
width: 424px;
float: right;
}
#footer {
height: 25px;
width: 1024px;
clear: both;
background-color: #960;
}
</style>
</head>

<body>
<div id="wrapper">
<div id="header">Content for id "header" Goes Here</div>
<div id="NavBar">Content for id "NavBar" Goes Here</div>
<div id="content">Content for id "content" Goes Here</div>
<div id="sidebar">Content for id "sidebar" Goes Here</div>
<div id="footer">Content for id "footer" Goes Here</div>
</div>
</body>
</html>

nubdev
10-26-2011, 10:42 AM
This should work:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
html {
height: 100%;
}

body {
margin-top:0px;
background-color: #CCC;
height: 100%;
}

#wrapper {
position: relative;
width: 1024px;
margin: 0 auto;
margin-bottom: -25px;
min-height: 100%;
}

#header {
height: 100px;
width: 1024px;
background-color: #939;
}

#NavBar {
height: 25px;
width: 1024px;
}

#content {
height: 450px;
width: 600px;
float: left;
}

#sidebar {
height: 450px;
width: 424px;
float: right;
}

#footer {
height: 25px;
width: 1024px;
position: relative;
margin:0 auto;
background-color: #960;
}

.clearfooter {
height: 25px;
clear: both;
}

</style>
</head>

<body>
<div id="wrapper">
<div id="header">Content for id "header" Goes Here</div>
<div id="NavBar">Content for id "NavBar" Goes Here</div>
<div id="content">Content for id "content" Goes Here</div>
<div id="sidebar">Content for id "sidebar" Goes Here</div>
<div class="clearfooter"></div>
</div>
<div id="footer">Content for id "footer" Goes Here</div>
</body>
</html>