redsox9
05-01-2008, 08:43 PM
I consider myself fairly experienced in web design but I'm having the greatest frustration with the <div> tag. For example, let us say that I have the following code:
<div id="main">
<div class="one">
<p>Content goes here</p>
</div>
<div class="two">
<p>Content goes here</p>
</div>
<div class="three">
<p>Content goes here</p>
</div>
</div>
Now, in my CCS stylesheet, I have the following:
div#main {
width: 80%;
margin: 0 auto;
padding: 0;
clear: both;
}
div.one {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
div.two {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
div.three {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
Now, what I cannot seem to do is get the <div> boxes to auto-adjust so that one, two, and three all have equal height in FF; right now, it defaults to what will contain the <div> content. However, in IE, the three <div> boxes do auto-adjust to equal one another regardless of how little or how much content there is. This becomes more apparent when you set the background of the body to be a darker color and the <div> boxes to be another.
Am I making sense here? I'm certain that there is a method that works regardless of your browser preference but I'm having no luck searching the web on this topic. Any help would be appreciated.
<div id="main">
<div class="one">
<p>Content goes here</p>
</div>
<div class="two">
<p>Content goes here</p>
</div>
<div class="three">
<p>Content goes here</p>
</div>
</div>
Now, in my CCS stylesheet, I have the following:
div#main {
width: 80%;
margin: 0 auto;
padding: 0;
clear: both;
}
div.one {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
div.two {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
div.three {
float: left;
width: 30%;
padding: 0;
margin: 0;
}
Now, what I cannot seem to do is get the <div> boxes to auto-adjust so that one, two, and three all have equal height in FF; right now, it defaults to what will contain the <div> content. However, in IE, the three <div> boxes do auto-adjust to equal one another regardless of how little or how much content there is. This becomes more apparent when you set the background of the body to be a darker color and the <div> boxes to be another.
Am I making sense here? I'm certain that there is a method that works regardless of your browser preference but I'm having no luck searching the web on this topic. Any help would be appreciated.