Avatar of rfiddler
rfiddlerFlag for Canada

asked on 

HTML comments in unordered list causing extra space in IE

I'm having a hell of a time with a weird issue in Internet Explorer 6 (haven't tested other versions), and not in other browsers like Opera and Firefox.

I have an unordered list that's set up to be managed by Dreamweaver's repeating regions, which uses comments throughout the list.

I've found that these comments are causing IE to display extra space.  So this test comment at the start of the content within list item 2 is creating a vertical gap between list items 1 and 2!

I've tried running all the tags together with no white-space, and this does not fix the problem.

Does anybody know why this might be happening?

Thanks!
<ul>
  <li><a href="test.html">List Item 1</a></li>
  <li><!--test--><a href="test.html">List Item 2</a></li>
  <li><a href="test.html">List Item 3</a></li>
</ul>

Open in new window

Web BrowsersCSS

Avatar of undefined
Last Comment
rfiddler
SOLUTION
Avatar of Karai_17
Karai_17
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
SOLUTION
Avatar of VirusMinus
VirusMinus
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rfiddler
rfiddler
Flag of Canada image

ASKER

I tried setting padding to 0 for ul, li, with no effect.  I did it through the attached CSS file as well as inline.

Here is my doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">


I haven't yet been able to reproduce it outside of this site.

Thanks for your help!
Avatar of Karai_17
Karai_17
Flag of Canada image

Can you post a link to the site and the relivent css document(s)? There might be a problem with inheritance.
Avatar of rfiddler
rfiddler
Flag of Canada image

ASKER

No I can't actually.  It's a government site and it's internal.  I'll try to replicate it and post that somewhere.

Thanks
SOLUTION
Avatar of Lolly-Ink
Lolly-Ink
Flag of Australia image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Avatar of rfiddler
rfiddler
Flag of Canada image

ASKER

Yeah, sorry for the wait.  It's suddenly been crazy at work and I've been pulled away from that.  I will try to re-create it tomorrow.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of rfiddler
rfiddler
Flag of Canada image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
CSS
CSS

Cascading Style Sheets (CSS) is a language used for describing the look and formatting of a document written in a markup language. Usually used to change web pages and user interfaces written in HTML, it can also be applied to any kind of XML document. CSS is designed primarily to distinguish the content of a document from its presentation.

43K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo