Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.