Jump to content

[SOLVED] Mysterious top padding


jordanwb

Recommended Posts

I'm making a website for myself and I'm having this weird problem with the left and right column. In IE browsers the right column has top padding, but in non IE browsers but in the left column has top padding. If I set a 1 pixel border on the left and right column everything is fine. URL: http://jordanwb.homelinux.com/jbwd

 

If I put a white 1 pixel border it works like it should but its sort of a kludge.

Link to comment
https://forums.phpfreaks.com/topic/135996-solved-mysterious-top-padding/
Share on other sites

The problem is kind of hard to explain, but basically, the p tags both have a top margin to them. With the floated element, the margin on the p tag contained inside, pushes the p down from the top of the floated element. (which makes sense, since it goes along with that element's floatedness). With the non-floated element, the p tags top margin extends out past the element it's contained in, which means that it doesn't push the element down.

 

To get rid of the problem, remove the padding on the left column's p tag. Or both p tags really, as it will do the same thing. You won't notice any difference on the right p tag though, even though it will have lost it's margin.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.