Help!

Commenting out in CSS


Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Software Writers/Coders RSS
Next:  Gary66  
Author Message
jeber



Joined: Dec 19, 2002
Posts: 4194

Location: The Village

PostPosted: Sun Sep 10, 2006 8:42 pm    Post subject: Commenting out in CSS

I'm beginning to get a grasp on CSS, but one little concept still eludes me.

Let's say I have the following in my style sheet:

Quote:
body {
background-color: #e1e4e8;
}

body, td {
margin: 0px;
padding: 0px;
text-align: left;
color: #000;
}

body, td, .indent, .defaulttext, .caption, .captiontext, .bodytable, .mediumtext,
.forumheader, .forumheader2, .forumheader3, .forumheader4, .forumheader5, .fcaption, .finfobar {
font: normal 10px verdana, tahoma, arial, sans-serif;
color: #000;
}
.tbox {
border: #A5ACB2 1px solid;
background-color: #fff;
}

.indent {
border: #999 1px dashed;
padding: 5px;
margin: 5px;
background-color: #f7f7f9;
}


Now if I want to comment out the .tbox border (and what is the .tbox? text box?), do I put the /* and */ only around the name of the item (.tbox), around the line "border", or where exactly? (BTW-what does td, as in (body, td,) mean?)
Back to top
silmaril8n



Joined: Jan 29, 2004
Posts: 1743

Location: Phoenix, AZ

PostPosted: Mon Sep 11, 2006 3:03 am    Post subject: Re: Commenting out in CSS [Login to view extended thread Info.]

You would put /* */ around the entire section that needs to be commented out.
Quote:
/* body,td {
stuff.stuf
}*/


The "body, td" just means that anything within the body tag (the entire page) and a td tag (table cell) should be styled in this way. Some browsers don't apply styles to 'td' unless it's very explicit like that.

If you wanted to only comment out a single style in the group then you would just single it out like:
Quote:
.tbox {
/* border: 1px solid #333; */
color: #fff;
}


The ".tbox" class in the sheet you included could mean Text Box but since it's a class (designated by the period in front) it can be applied to virtually any tag in the page. It depends on the html as to what it actually styles.
Back to top
AIM Address
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Software Writers/Coders All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum