homepage Welcome to WebmasterWorld Guest from 54.211.230.186
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
firefox and comments in the style specification
dcbiker

10+ Year Member



 
Msg#: 6836 posted 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

5+ Year Member



 
Msg#: 6836 posted 5:56 pm on Jun 30, 2005 (gmt 0)

Can I see the CSS?

dcbiker

10+ Year Member



 
Msg#: 6836 posted 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

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



 
Msg#: 6836 posted 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

10+ Year Member



 
Msg#: 6836 posted 6:44 pm on Jun 30, 2005 (gmt 0)

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

nigassma

5+ Year Member



 
Msg#: 6836 posted 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.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved