Why is IE9 putting in an extra bullet?!

Discussion in 'CSS' started by MrMattySales, Oct 30, 2012.

  1. #1
    Hi, I have coded a page which looks good on FF and Chrome, but view it in IE9 and it puts in an extra blank bullet point between h2 "Shopping..." and li "Pricing..." here is code snippet:

    <div id="wrappermain">
    <div id="feature">
    <div id="nav-left">
    <h2><a name="nav" id="nav">Shopping Information</h2>
    <ul>
    <li><a href="#pricing_vat">Pricing & VAT</a></li>
    <li><a href="#delivery_charges">Delivery Charges</a></li>
    <li><a href="#delivery_options">Delivery Options</a></li>
    <li><a href="#returns">Returns</a></li>
    <li><a href="#product_availabiltiy">Product Availability</a></li>
    </ul>
    </div>

    I have examined code in IE and it is creating a new <ul><li></li></ul>, where is it getting it from?

    help much appreciated!
     
    MrMattySales, Oct 30, 2012 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    You didn't close the anchor inside the H2, so browsers are left guessing how/what/where/why as to when to close the tags. That's likely your problem.

    NOT that there's any reason to use name when you have ID unless you still really care about nyetscape 4... NOT that using name+anchor or even using anchor serves any real purpose without a href in modern code... NOT that there is likely any reason to have so many pointless DIV and ID in the first place since you've already got plenty of them on parent elements, could inherit off that parent, and UL's a perfectly good block level container unto itself.

    really in this day and age the only tags that should end up with name on them are form elements or META.

    Though without seeing the rest of the page and the CSS being applied to that markup, anything we tell you is a wild guess in the dark.
     
    deathshadow, Oct 30, 2012 IP
  3. wizardofx

    wizardofx Well-Known Member

    Messages:
    572
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    140
    #3
    Educate me, where is the anchor not closed?

    wiz
     
    wizardofx, Oct 30, 2012 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    
    <h2><a name="nav" id="nav">Shopping Information</h2>
    
    Code (markup):
    Plain as day.
     
    deathshadow, Oct 30, 2012 IP
  5. wizardofx

    wizardofx Well-Known Member

    Messages:
    572
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    140
    #5
    Right. Should have been <h2><a name="nav" id="nav">Shopping Information</a></h2>

    But I don't see the need for all the foofieness. <h2>Shopping Information</h2> would do the same thing, right?

    wiz
     
    wizardofx, Oct 31, 2012 IP
  6. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #6
    Well, the ID might be needed if they want to do #nav in the URL... which is what people USED to use 'name' on empty anchors for back on nyetscape 4.

    Really post 2001 there's little legitimate reason to use NAME on anything but INPUT, SELECT, BUTTON and TEXTAREA.

    Though I still laugh at how many people don't realize that's one of the two legitimate reasons to use ID instead of class (the other being targeting with getElementById).
     
    deathshadow, Oct 31, 2012 IP