Divs don't align in IE/Win - help!

Discussion in 'Web Design and Development' started by slightly, Jul 10, 2006.

  1. slightly macrumors regular


    Mar 14, 2003
    Beacon, NY

    I'm converting a site to CSS2, and am stuck at one issue.

    Here's the site:


    Everything looks relatively good on the Mac, and on Firefox/Win, but on IE/Win, the three divs at the top of the page ("Matt", "Personal", and "Macktez.com") are not correctly vertically aligned. The first and last are fine, but the second is positioned lower than the other two, forcing a vertical scroll in the div that contains all three objects.

    Here's the CSS:


    The culprit element is sectionlabelsub.

    As I say, it looks fine on every other browser (and is W3C validated to XHTML 1.0 Transitional) so I don't want to mess up its appearance on those browsers.

    Can anyone help?


  2. maximile macrumors member

    Oct 27, 2003
    Herefordshire, UK
    You don't have to worry about messing up the other browsers. Just do a quick search for IE conditional comments.

    I don't have IE Win, so I can't help you any further, I'm afraid.
  3. Squareball macrumors regular

    Mar 16, 2004
    Palo Alto, CA
    There are other tags besides divs ;)

    Try making that section

    1) A list and making the <li>s display inline
    2) A table (yeah the web gods wont strike you dead)

    For 1) see http://www.alistapart.com/articles/taminglists/

    If you are going to come back with "standards" for 2) then I suggest you replace <i> in your page with <em> or <strong> and style it the way you want first.

    Really though, standards are great and I use them wherever I can, but you must realize too that sometimes you have to do what you have to do to make stuff work the right way with the least amount of hacks.

    Is it really better to do an IE conditional statement and an Opera and IE:Mac conditional than it is to just use a table? That's just trading one hack for another. In the end, HTML was created for text documents and not great design... until all browsers follow the standards 100% and the standards provide us with the tools we need (hell CSS grid layout), you'll have to know when it is smart to deviate from the 'standards'.

Share This Page