Welcome to WebmasterWorld Guest from 54.196.175.173

Forum Moderators: not2easy

Message Too Old, No Replies

firefox and comments in the style specification

     

dcbiker

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

10+ Year Member



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?

nigassma

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

10+ Year Member



Can I see the CSS?

dcbiker

6:18 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



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.

encyclo

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

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



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]

dcbiker

6:44 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



of course ... stupid of me .... sorry

nigassma

6:55 pm on Jun 30, 2005 (gmt 0)

10+ Year Member



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

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

etc. etc.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month