Wrox Programmer Forums
|
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 19th, 2005, 10:42 PM
Authorized User
 
Join Date: Jan 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS comments problem

Does the comment tag not work on css pages? When I put the in my css page to seperate sections it ignores the next line. In the example below the #index_body line is totally ignored but the div.weather and div.title work as desrcibed. Now if I only use than it works fine. As soon as I the next line of code in the css page is ignored. Is this a glitch in css? IE6, Mozilla 1.7 and firefox all pickup the same problem.


    #index_body { position: absolute; top: 1px; left: 1px; width: 700px; height: 500px; border-width: 0px; padding: 1px;}
    div.weather {position: absolute; top: 1px; left: 1px; }

    div.title h1{line-height:105%; position: absolute; top: 1px; left: 280px;}

Thanks

 
Old January 20th, 2005, 02:55 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Nope. Those comments are for HTML.

CSS uses /* */ like this:
Code:
.MySelector
{
   color: #fff;
   /* border: 1px solid green; */
}
This will disable the border style, but still apply the color.

CHeers,

Imar
 
Old January 20th, 2005, 09:23 AM
Authorized User
 
Join Date: Jan 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks
Quote:
quote:Originally posted by Imar
 Nope. Those comments are for HTML.

CSS uses /* */ like this:
Code:
.MySelector
{
   color: #fff;
   /* border: 1px solid green; */
}
This will disable the border style, but still apply the color.

CHeers,

Imar





Similar Threads
Thread Thread Starter Forum Replies Last Post
Css formatting problem beetle_jaipur CSS Cascading Style Sheets 2 June 5th, 2009 07:16 AM
CSS problem stuartlittle ASP.NET 2.0 Professional 1 March 11th, 2008 02:28 PM
problem with css menus kanoorani CSS Cascading Style Sheets 0 February 16th, 2008 07:44 AM
CSS Menu problem twc02 CSS Cascading Style Sheets 24 March 11th, 2005 11:01 AM
CSS Problem Ben Horne HTML Code Clinic 2 November 10th, 2003 05:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.