Fix my footer please!
-
On my website, I inserted a logo that was larger than the default one that came with the theme. Therefore, my content overlapped it. To fixed this I changed the content from relative to absolute. I believe this was the only change I made, but my footer no longer stays at the bottom of the page… it’s like halfway up the page now.
Here is my original CSS:
#wrap {
margin: auto;
text-align: left;
width: 960px;
position: relative;
}#header, #content, #footer {
float: left; display: inline;
clear: both;
position: relative;
}#header {
height: 250px;
width: 100%;
}
#logo { margin: 0 }#logo a {
/* background: url(images/logo.png) no-repeat; */
cursor: pointer;
position: absolute;
top: 90px; left: 0px;
display:block;
}#content {
padding: 0 0 4em;
width: 100%;
}
.home #main {
float: left;
width: 374px;
}
#main {
float: left;
width: 681px;
}
.home #sidebar {
float: right;
width: 543px;
}
#sidebar {
float: right;
width: 250px;
}
#sidebar h3 { margin-top:10px; }#footer {
width: 100%; height: 65px;
background: url(images/bg-footer.gif) repeat-x;
}
#footerWrap {
color: #dadada;
width: 960px;
margin: 0 auto;
position: relative;
}Here is how I changed my CSS:
#wrap {
margin: auto;
text-align: left;
width: 960px;
position: relative; min-height: 100%
}#header, #content, #footer {
float: left; display: inline;
clear: both;
position: relative;
}#header {
height: 250px;
width: 100%;
}
#logo { margin: 0 }#logo a {
/* background: url(images/logo.png) no-repeat; */
cursor: pointer;
position: absolute;
top: 90px; left: 0px;
display:block;
}#content {
position: relative;
top: 120px; left: 0px;
padding: 00 0 4em;
width: 100%;
}
.home #main {
float: left;
width: 374px;
}
#main {
float: left;
width: 681px;
}
.home #sidebar {
float: right;
width: 543px;
}
#sidebar {
float: right;
width: 250px;
}
#sidebar h3 { margin-top:10px; }#footer {
width: 100%; height: 65px;
background: url(images/bg-footer.gif) repeat-x;
}
#footerWrap {
color: #dadada;
width: 960px;
margin: 0 auto;
position: relative}
Any input would be appreciated! My skills are very basic.
- The topic ‘Fix my footer please!’ is closed to new replies.