treehouse : what would you like to learn today?
Web Design Web Development iOS Development

IE bug (weird indenting of first line)

  • I have this weird problem of having the first line of the first element inside my list elements indented. Has anyone come up against this in IE8, 7 & 6.

    theres nothing standing out in the css and it works fine in all modern browsers.

    Here's one block of code its effecting.

    <ul>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=8F54F9FD-D847-0FF2-FF336F981121BC60">International Open Qualifier</a> <span><strong>Next Date:</strong> Wed 04 Apr 2012</span></li>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=AE16A40F-A6DF-C3A6-86833A80C8DDA9C8">Fife Open Golf Championships</a> <span><strong>Next Date:</strong> Sat 19 May 2012</span></li>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=CB5C3379-CCD7-5128-932A1A298ED246B0">Bookbug Session at Lundin Links Library</a> <span><strong>Next Date:</strong> Tue 03 Apr 2012</span></li>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=22E6FFEC-AA08-F209-3F7CB1B73106A67D">Irn-Bru Scottish Football League Division 1</a> <span><strong>Next Date:</strong> Sat 07 Apr 2012</span></li>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=2323CBAB-CF4B-86A6-4296488E98358D5C">Irn-Bru Scottish Football League Division 2</a> <span><strong>Next Date:</strong> Sat 07 Apr 2012</span></li>

    <li><a href="whatson/index.cfm?fuseaction=whatson.display&amp;id=07B238BF-DBC0-4D22-DFF56586025665C4">Scottish Premier League Football</a> <span><strong>Next Date:</strong> Sat 07 Apr 2012</span></li>

    </ul>
  • By itself, there is nothing wrong with that code, and it displays fine in IE: http://www.senff.com/test.html

    We'll need to see it within its context to have a better idea what could be wrong.
  • I would love to give you the url but its an internal dev environment.

    I'm trying to debug this the best I can but I'm struggling and just wondered if anyone has come up against something similar.
  • You might find that it's actually another element that is causing the problem. So without the full context of the code it's hard to advise on what the problem might be.
  • This is definitely a floating issue. I have removed all styles and added them back one after the other and the issues arise once I introduce floats to the elements decedents of the LI.
  • try to recreate the problem - if you can upload an example to a live site, or make a jsfiddle, others could check it out and offer more helpful advice.