Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What is the meansing of the following CSS syntax?

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
I am looking at this and wonder what does it mean in plain English

Code:
	.coolTable {
	border-collapse:collapse; 
	margin-top:2px;
	margin-bottom: 2px;
	font-family: arial;
	font-size: 8.5px;
	text-transform: uppercase;
	}
	.coolTable .r0 td	{}
	.coolTable .r1 td	{background-color:#F6F6F6;}
	.coolTable .over td	{background-color:#FF8800;}
	.coolTable .sortedAsc		{background-color:#66CC66 !important;}
	.coolTable .sortedDesc		{background-color:#CC6666 !important;}	
	}

Is this a CLASS within a CLASS - How can I set this as property to a page element?

Not knowing but trying to make sense out of it, I think:
(a) Table is set as CLASS "coolTable"
(b) Elements within this table are set as CLASS r0, r1, over, sortedAsc and sortedDesc

Will be playing with this CSS and look forward to learning a couple of things!



--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
I agree with 1DMF. The last Curly Brace is misplaced there.

Other than that, this is just standard CSS.

An Element with a class of .coolTable

Code:
[b][/b][COLOR=#75507B].coolTable {
	border-collapse:collapse; 
	margin-top:2px;
	margin-bottom: 2px;
	font-family: arial;
	font-size: 8.5px;
	text-transform: uppercase;
	}[/color]

And then several elements inside that element.
Code:
[COLOR=#3465A4]	.coolTable .r0 td	{}[/color]

	[COLOR=#3465A4].coolTable .r1 td	{background-color:#F6F6F6;}[/color]

	[COLOR=#3465A4].coolTable .sortedAsc		{background-color:#66CC66 !important;}[/color]

	[COLOR=#3465A4].coolTable .sortedDesc		{background-color:#CC6666 !important;}	[/color]

[b]	[COLOR=#A40000]}[/color][/b]

A table cell (td) inside an element with a class of .r0 that's inside an element with a class of .coolTable.

A table cell (td) inside an element with a class of .r1 that's inside an element with a class of .coolTable.

An element with a class of .sortAsc that's inside an element with a class of .coolTable

An element with a class of .sortDesc that's inside an element with a class of .coolTable



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Hi

Just a small note : the closing brace ( } ) at the end is not necessarily "misplaced", it can be as well mispasted.

Of course, supposing there was an opening brace ( { ) earlier, together with a CSS Conditional Rule ( aka @-rule ) :
CSS:
[highlight]@media screen [red]{[/red][/highlight]
  .coolTable {
    border-collapse:collapse;
    margin-top:2px;
    margin-bottom: 2px;
    font-family: arial;
    font-size: 8.5px;
    text-transform: uppercase;
  }
  .coolTable .r0 td	{}
  .coolTable .r1 td	{background-color:#F6F6F6;}
  .coolTable .over td	{background-color:#FF8800;}
  .coolTable .sortedAsc		{background-color:#66CC66 !important;}
  .coolTable .sortedDesc		{background-color:#CC6666 !important;}
[highlight][red]}[/red][/highlight]

Feherke.
feherke.github.io
 
Very true, [wink]

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top