Just a little aligning question - i have a 3 column layout, columns 2 and 3 sit a little below column 1....is this a float problem or a margin problem? I appreciate your help! lots!
get rid of that and u should be fine. Cause everything is inline properly its just your 10px padding is making it look messed up.
or do this
Code:
<div id="content">
<h2>what is your ART? </h2>
<div class="padding">
<p>yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda yadda </p>
</div>
</div>
Put ur H2 tags above the padding class.
You also have a div id that doesnt have any attributes. "container"
__________________
Eric "PitbullMean" Melo
Always Start your layout with*{border:0; margin:0; padding:0;}
Be sure to Thank ALL Users who give assistance.
Last edited by PitbullMean; 04-05-2009 at 05:31 PM..
Hello intcon,
You might want to have that 10px on the sides so you can easily get rid of it on the top, since that's where the problem is.
Try this instead -
That use of overflow:auto; is clearing your floats. Have a look at this page for a description of what's happening -http://www.quirksmode.org/css/clearing.html
Your #container is another div that's not cleared. To demonstrate, put a background color on it like this -
Code:
#container {
background: #f00;
}
No red background shows up.
It does show up when you clear the floats like this -
Code:
#container {
overflow: auto;
background: #f00;
}
But... since you don't style #container in your CSS and it's not enclosing anything, maybe you can just get rid of it. Have a look at this page on divitis.
thanksk for the quick responses! wow!
if i take out the padding rule altogether, all 3 columns line up correctly (didn't know you shouldn't use .padding - I got it from a tutorial somewhere out there!)
if i change the img info tho, excavator, my 3rd column then drops back down so the text isn't even with the top of the photo...i guess i don't see the reason why that happens with the code you sent! (yes, I am clueless, and i admit it)
the container i also learned on a CSS tutorial and it's supposed to just be a placeholder for the 3 columns...i swear that's what the tutorial said! of course then i added in some of my own *clever* touches and probably trashed what i originally started out with....if i remove container, the 3 columns won't just spread out all over the place? or do i just need to close it (reading the article on divitis!)
the container i also learned on a CSS tutorial and it's supposed to just be a placeholder for the 3 columns...i swear that's what the tutorial said! of course then i added in some of my own *clever* touches and probably trashed what i originally started out with....if i remove container, the 3 columns won't just spread out all over the place? or do i just need to close it (reading the article on divitis!)
carrie
Your floated columns are already contained by #wrapper.
A really simple rule of thumb, if you don't have style a div it's not needed.
if i change the img info tho, excavator, my 3rd column then drops back down so the text isn't even with the top of the photo...i guess i don't see the reason why that happens with the code you sent!
carrie
Try the same thing with .imginfo that we did with #container. Add a background color to the code the way it is now-
The .imginfo now expands to contain the floated image, including the 10px bottom margin you have on .imginfo img
-----------------
Now the text is off, like you said. The div is correct now though, so we can style the text to go where we want.
To do that we need to edit the markup. If you delete the bits in red the text moves up -
Code:
</div>
</div>
<div id="side-b"> <div class="imginfo"><img src="images/boy.jpg" height="83" width="100">
<h2>book now</h2>Text Text Text Text Text Text Text Text Text Text Text Text <p></p>
</div>
<div class="imginfo">
<img src="images/boy.jpg" height="83" width="100">
<p></p> <h2>feature</h2>
Text Text Text Text Text Text Text Text Text Text Text Text <p></p>
</div>
<div class="imginfo">
<img src="images/boy.jpg" height="83" width="100">
<p></p> <h2>experience</h2>
Text Text Text Text Text Text Text Text Text Text Text Text <p></p>
</div>
<div class="imginfo">
<img src="images/boy.jpg" height="83" width="100">
<p></p> <h2>purchase gift</h2>Text Text Text Text Text Text Text Text Text Text Text Text <p></p>
</div>
</div>
</div>
<div id="footer">
<div class="right"><span class="footer">