Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 957575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:43:33+00:00 2026-05-16T00:43:33+00:00

I decided to show a breaking version of what I am talking about. It

  • 0

I decided to show a breaking version of what I am talking about. It is not important how it messes up the layout, only that it causes the DIV element to be null….

 <!-- [ top panel ] --><div id="top_panel">
 <!-- -------------------------------------- -->
    <script type="text/javascript">
   alert(document.getElementById('top_panel'));
    </script>
 </div>

The above code will return the element as null, every time…. if I increase or decrease the number of dashes it still fails as long as the interior dashes end with a closing pair of dashes. For the sake of example, I will use [open] and [close] to represent pairs of “–” dashes…

So, the code ends up being interpreted this way to break:

 <!-- [close][open][close][open][close][open][close][open][close] -->

In this example, it is the last [close] and the “–>” which now cause an open, hanging comment.

I only seem to run into comment-based issues in FF these days. All other browsers seem okay with anything I have thrown at them…

I KNOW that this is not considered legal commenting, but it still does not change the fact that I had to trip over this situation to become aware of the issue… I am hoping others can avoid the same simple problem and share their own twists on weird, comment-based issues in any browser… I am sure this is not the only instance of good commenting gone bad.

I also understand that leaving a space after the “<” is a no-no as well: “<” + ” ” + “!” + “–” = Nooooo!

Thanks for all your help, all!

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T00:43:33+00:00Added an answer on May 16, 2026 at 12:43 am

    You can’t use -- inside comments because it ends the comment. This isn’t a Firefox thing – it’s defined by the standards. Any browser that doesn’t treat -- as start/end of comment is doing it wrong and most likely will be bug-fixed eventually.

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was not able to find same problem, for that reason I decided to
Since Compact Framework calls Show() on the form passed to Application.Run() , I decided
I decided to learn how to use github about a month ago, and I
I decided not to use an orm and going to use straight ADO.NET for
I'm writing a custom TreeView from ScrollableControl. I decided to show tooltips when the
I decided to store uploaded to servlet pictures in DB. But how to show
I have a ViewController (with navigation) that needs to show 7 different content layouts
I am trying to develop a BlackBerry application that will show data from an
We have been using TFS 2010 for about 6 months and we have decided
This is an annoyance that I've tolerated for too long, and finally decided to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.