Welcome to WebmasterWorld Guest from 54.162.164.247

Forum Moderators: not2easy

Message Too Old, No Replies

firefox and comments in the style specification

     
5:09 pm on Jun 30, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 24, 2004
posts:14
votes: 0


i have noticed that comments in the body of a style specification, which IE ignores appropriately, screws up firefox ... in general it tends to ignore the next rule after the comment.

is this correct or is it just me?

5:56 pm on June 30, 2005 (gmt 0)

Full Member

10+ Year Member

joined:June 10, 2005
posts:271
votes: 0


Can I see the CSS?
6:18 pm on June 30, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 24, 2004
posts:14
votes: 0


something like this:

body {position: relative; margin: 0; padding: 0;}

div#links {position: absolute; top: 270px; left: 30;
width: 155px; height: auto; z-index: 10;}

div#links a {display: block; text-align: center;
font: bold 13px Verdana, sans-serif;
padding: 5 0; margin: 0 0;
border: solid #000; border-width: 1 1 0 4;
text-decoration: none; color: #000;
background: #eff; border-left: 4px solid purple;}

<!-- above sets up location, appearance of links in a div of id=links then below sets up appearance of hover state for these links -->

div#links a:hover {color: #909; background: #9af;
border-left: 3px solid red;
text-decoration: underline;}

with the comment in their the div#links a:hover was ignored by firefox ... ie was fine. this was in windows.

6:23 pm on June 30, 2005 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 31, 2003
posts:9074
votes: 6


You might want to put your stylesheet through the CSS validator [jigsaw.w3.org] - those are HTML comments, not CSS ones. Your stylesheet comments should be enclosed in /* */ like this:

[b]/*[/b] above sets up location, appearance of links in a div of id=links then below sets up appearance of hover state for these links [b]*/[/b]
6:44 pm on June 30, 2005 (gmt 0)

New User

10+ Year Member

joined:Feb 24, 2004
posts:14
votes: 0


of course ... stupid of me .... sorry
6:55 pm on June 30, 2005 (gmt 0)

Full Member

10+ Year Member

joined:June 10, 2005
posts:271
votes: 0


Not stupid, just different ways to get comments in code..

//
<!-- -->
/**/

etc. etc.