Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help with Shortcode and a few other issues. Re: Help with Shortcode and a few other issues.

#143260
Kitty Giraudel
Participant

Instead of setting height to elements that collapse, try clearing floats by setting `overflow: hidden` to the parent element.

First of all, **I deleted all empty elements**. And here is how I cleaned a bit your code:

.nav_menu {
/* Added */
overflow: hidden;
width: 975px;
margin: 0 auto;

/* Removed */
width: 935px;
margin-left: auto;
margin-right: auto;
padding-left: 8px;
}

#content {
width: 975px;
font-size: .7em;

/* Added */
margin: 0 auto;
overflow: hidden;

/* Removed */
height: auto;
margin-left: auto;
margin-right: auto;
background-color: #fff;
color: #000000;
padding-top: 0;
padding-bottom: 0;
}

#col-2 {
width: 600px;
float: left;

/* Removed */
height: 320px;
margin: 18px 0 0 25px;
display: inline;
}

#col-3 {
border-left: 1px solid #CCCCCC;
width: 280px;
float: right;
text-align: right;

/* Removed */
margin: 32px 25px 18px 0;
display: inline;
}

#footer {
/* Added */
background: url(images/footer_background.gif) black;
overflow: hidden;

/* Removed */
width: 100%;
height: 165px;
text-align: center;
clear: both;
background-image: url(images/footer_background.gif);
margin-left: 0;
font-family: “Trebuchet MS”, Arial, Helvetica, sans-serif;
}

There are a ton of other things to fix but this would be a good start. :)