dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: ol entries not lining up in ie.

  1. #1
    Join Date
    May 2006
    Posts
    40

    ol entries not lining up in ie.

    I have an ordered list in a document. All of the little .s line up for the first 6 entries then they shift left for the last two.

    In Opera they line up perfectly but in ie. they won't.

    The lining up/not lining up I have tracked down to line height.
    command in my css.

    line-height: 1.5em;

    When I take it out the problem goes away. Even if I confine the attribute to <p> tags it still throws off the list.

    Is there a known issue here? I searched the forum but couldn't locate any reference to it.

  2. #2
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Could you please post your sample code. It is impossible to even guess the problem without first seeing your code.

  3. #3
    Join Date
    May 2006
    Posts
    40
    I'll happily post the code. I thought though before wasting space here I'd check to see if it was a common problem I'd just failed to discover.

    The full css is here http://htmlhq.com/check.html

    The page is here http://htmlhq.com/htmlhq/htmlht/makepagerev.html
    Last edited by qasabah; 09-05-2006 at 07:52 PM.

  4. #4
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    I take it then that your <ol> is going to be inside of the <div id="middle">? This really isn't necessary because you can just as easily style the <ol> like <ol id="middle">, keeing those declaration & selectors, and eliminate the need to contain it in another container. This reduces the size of your HTML, for faster downloads, etc. But it is valid, either way.

    I do not see the error you report. I do question why you need to use "line-height:1.5em" on a <div>, which is a container, not a text element. It would like instructing a <div> to have "font-family:arial;". It would make more sence to instruct "p" (the quintessential "text" declaration) to have the a line-height:1.5em, or for that matter, font-family: Georgia, serif; font-size: 10pt; as well. etc.
    Taking the line-height:1.5em out of the #middle isn't correcting any bug, it is making the code correct. Maybe that is part of what you are seeing. But in my editor, I do not see the error you are reporting. Everything looked okay to me.

    Now, if you were going have TEXT inside of the <div #id-middle> that needed to be styled differently than everywhere else on the web page, go:

    #middle p{font-family:this; line-height:that; color:whatever;, etc}
    Last edited by WebJoel; 09-05-2006 at 07:57 PM.

  5. #5
    Join Date
    May 2006
    Posts
    40
    I agree about the positioning of the line height. The problem persists when it is attached to the <p> tag also. The line height is for readabilty as I will use some footnotes.

  6. #6
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    This is solved by triggering hasLayout on the <ol>.

    This is discussed in more detail in this DevShed thread.

    qasabah, It would be better if you followed up on the other threads when you post more than one asking the same question.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles