homepage Welcome to WebmasterWorld Guest from 50.19.155.235
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
Subscribe and Support WebmasterWorld
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library : Charter : Moderator: open

CSS Forum

    
firefox and comments in the style specification
dcbiker




msg:1201316
 5:09 pm on Jun 30, 2005 (gmt 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?

 

nigassma




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

Can I see the CSS?

dcbiker




msg:1201318
 6:18 pm on Jun 30, 2005 (gmt 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.

encyclo




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

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




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

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

nigassma




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

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

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

etc. etc.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved