Html comment in mozilla

Hello

My problem is that firefox is behaving weirdly in my system. I’m trying to create any page, and when ever I put an html comment it doesn’t show it properly and then I’m not getting the proper result in firefox.

How can I solve this issue ?

Well here is the simple html comment which is being converted into firefox like:

This tag is being

<!---- End of main div ---->

like
>!----------- End of main div ------>

or some times like

<!--------- End of main div --------->

And after that all the page elements vanishes away…

How can I solve this issue ?

We would need to see a site wehre this is happening at :). Just that little snippet there isn’t going to give us enough to create a test case :).

Thanx for the reply Ryan

Well I’m testing on my pc only, So can’t post any link to it.

But I can show u my full code. I’m getting results in all browser even in IE, but not in firefox:mad:

Full code should work fine, make sure when you post the code, we can reproduce the issue on our end :slight_smile:

You CANNOT legally have that amount of conjoined dashes (without white-space) after the first 2, i.e. – in a HTML Comment the proper syntax is <!-- … –> that is probably why it is screwing up. :slight_smile:

White space is not permitted between the markup declaration open delimiter(“<!”)
and the comment open delimiter (“–”), but is permitted between the comment close
delimiter (“–”) and the markup declaration close delimiter (“>”). A common error is to
include a string of hyphens (“—”) within a comment. Authors should avoid putting
two or more adjacent hyphens inside comments.

I am assuming you meant just the comments were doing this and not where you were putting them?

As xhtmlcoder says, the problem is your hyphens inside the comment. Any pair of hypens after <!-- will terminate (or restart) the comment; it doesn’t stop at --> as many believe.

<!-- comment -- not comment -- comment again -->

So you have an empty comment followed by a the text “End of main div ---->”. :slight_smile:

Never use more than one hyphen at a time inside an SGML comment.

It might have to deal with IE’S comment bug. http://www.positioniseverything.net/explorer/dup-characters.html

It depends, I would have to see the document.

I doubt it, he said IE was fine and there has been no mention of IE being outa whack :).