View Full Version : CSS Question on newly discover Syntax

02-23-2011, 10:46 PM
.container_12 .grid_4,
1) I notice there is no comma after _12 to ask what is the meaning of this since the comma is after -4,?

Normally, I would see .grid_4, .grid_6, .grid_12 to know they are individually assigned {float: left; margin:
4px;}. I try searching to get an understanding of two dot variable with no comma in 1) above to ask? Could not
copy the code from viewer to thus type a not too exact facismile to wonder and to ask for some fine points help to
be aware of. I have read some css book, etc but I cannot recall coming across something like 1) above.

Thanks in advance for taking the time to educate me and deeply appreciated.

css sheet1
#header { margin: 0.8em;}

css sheet2
.grid_4, .grid_6<b>,</b> .grid_12 {float: left; margin: 4px;}
<b>.container_12 .grid_4,</b> .container_16 .grid_6 {width: 700px;}

Html coding with usage of the style sheet
&lt;div id="header" class="grid_12"&gt;
&lt;!-- TITLE &amp; BLOCKS --&gt;
&lt;div id=...

02-24-2011, 12:22 AM
When selectors are separated by commas they share the same rules. .grid_4, .grid_6, .grid_12 will have the same rules like text color and size. It saves space to do things this way.

.container_12 .grid_4 is different. Here the rules for .grid_4 only apply when it is contained within something with the .container_12 id. It ( .grid_4) may have a different set of rules when inside of a different container.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum