WordPress.org

Ready to get started?Download WordPress

Forums

Problem with layout on new theme... (2 posts)

  1. fffizzz
    Member
    Posted 6 years ago #

    I'm new to CSS, let me be very clear on that. Now after a lot of reading, and playing around I think I have my site the way i want it, however IE doesn't want to play with respect. Its showing my sidebar below my content, where-as firefox does not show this behavior. The site in question is http://www.djkelso.com

    Its still a work in progress, and I know it has something to do with DIV's, but after 2 days maybe someone can kindly point out my mistake.

    Thanks in advance.

  2. rhys
    Member
    Posted 6 years ago #

    Hi fffizzz

    IEx computes padding into the width of a container, so it makes your left container 550 + 51(Padding-left) + 35(Padding-right) and then doesn't leave room for the right column, which then floats to the bottom of the 800px container div.

    Have played with this problem and expressing the padding in ems seems to resolve it:
    `
    .sub_left {
    padding-RIGHT: 1em; padding-LEFT: 6em; PADDING-BOTTOM: 10px; WIDTH: 550px; PADDING-TOP: 0px border: 1px solid red;
    }
    .sub_right {
    PADDING-RIGHT: 1em; PADDING-LEFT: en; PADDING-BOTTOM: 10px; PADDING-TOP: 29px; border: 1px solid green;
    }

    BTW: it makes troubleshooting easy if you temporarily hang a border around your divs, then you can see what they are doing.

Topic Closed

This topic has been closed to new replies.

About this Topic