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!
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.
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
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).