• Resolved u6crash

    (@u6crash)


    Recently I’ve taken on the task of building a new theme from scratch. I’m trying not to get too far ahead of myself and make sure each new component works before moving onto the next.

    Currently I have a semi-custom theme that I made two years ago from the default theme by Dave Shea. You could say I’m a little out of practice. Anyway, the current theme has the wrapper div the way I like it, with a border on the left and right, centered.

    The new theme isn’t working right. The validator says all is good, but I know it’s not right. I’m also using Firebug to highlight different areas and the wrapper div is never highlighted. The best I was able to do while trying to apply a border on all four sides was getting a border at the top.

    Any help would be much appreciated! I don’t know if I have a CSS conflict or what. Might be worth mentioning a couple differences between the two. Old working theme has a div called “content” instead of “container” in the new one. The old one has an id for “sidebar” while the new one has a class for “sidebar”. I started the new one with instructions found at wpdesigner.com and it all seemed pretty solid until I started tweaking it myself.

Viewing 3 replies - 1 through 3 (of 3 total)
  • All of your div elements inside “wrapper” are floated.

    This means that “wrapper” has nothing inside it to give it height.

    Add a redundant div after your “footer” div with the style of clear:both

    html:
    <div class="cleaner">&nbsp;</div>
    css:
    .cleaner{clear: both;}

    It clears the floats of the other objects and will force your wrapper to respect the heights of the other floated objects its contains.

    Thread Starter u6crash

    (@u6crash)

    Thank you! I’m not going to say that I fully understand why it works (as I didn’t have an empty cleaner div in the other version), but I’ll keep what you said in mind as I continue to compare it to my previous working version. Thanks so much for your help!

    nyunyu

    (@nyunyu)

    zeniph, thank you for the brilliant solution (well, at least to newbie learner like me). My problem solve just after reading and do like what you suggest.

    Many thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Problems with wrapper div id’ is closed to new replies.