Latest Featured Articles
New two columns valid skin package.
Posted at:Wednesday, October 29, 2008 Viewed:(94)times. "Hi,I would like to announce our new skin package, "Nukedesigners two columns for dotnetnuke."The va..."....Read more....
Takeslides at photobucket.
Posted at:Saturday, August 16, 2008 Viewed:(274)times. "Hi All! I'm quite excited to share here that "takeslides" was just added to the "Photobucket Applic..."....Read more....
Takeslides.com at Orkut and facebook.
Posted at:Saturday, July 26, 2008 Viewed:(354)times. "Well these couple of month were quite overwelming. From the point of launching takeslides at hi5.com..."....Read more....
Takeslides at hi5.com
Posted at:Sunday, June 01, 2008 Viewed:(448)times. "Hi! Just a few hours ago takeslides.com was launched at hi5.com."....Read more....
Takeslides.com is launched!!!
Posted at:Tuesday, May 13, 2008 Viewed:(580)times. "Hi Everyone, I'm glad and excited after quite some long time of silence, (at least at "nukedesigner..."....Read more....
iTune latest RSS slideshow gadget
Posted at:Thursday, February 07, 2008 Viewed:(683)times. "Hi! We have just released our new gadget. It is a slideshow of iTunes latest by all categories. Yo..."....Read more....
Exciting news for Picasa, Photobucket and Flickr users!
Posted at:Tuesday, January 22, 2008 Viewed:(828)times. "TURN your RSS buttons at the  bottom of any of your albums pages to a beautiful slideshow withi..."....Read more....
"Announcements" new feature in the social bookmarking template
Posted at:Saturday, December 15, 2007 Viewed:(823)times. "Hi! We've added a new  "Announcement" feature to our "social bookmarking template". Please ta..."....Read more....
A new forum as well.
Posted at:Thursday, December 13, 2007 Viewed:(932)times. ""....Read more....
New features: A newsletter and a new catalog
Posted at:Thursday, December 13, 2007 Viewed:(1149)times. "Hi all! I'm excited to announce those two new features. The first is the newsletter which I'm usin..."....Read more....
Support, Tutorials, Articles

what are Child classes in CSS.

We, dnn users know about child links, child tabs, child pages and so on.

In CSS there is something similar but also different which is called  "child classes".

At this short article will try to explain and give some examples for that idea which on the one hand can be quite

mixing but on the other hand very use full.

let  us start with an example that will make things clearer right on:

we'll start with the "paragraph". (p)

We first create a general class for "p":

p

{

padding:6px 12px; /* padding top and bottom 6px padding to both sides 12px  */

}

Now, we want that in box1 the text inside will be aligned to the right, in box2 to be justify,

and in box3 to the left.

so that would be the addition CSS for that:

#box1 p

{

text-align:right;

}

#box2 p

{

text-align:justify;

}

#box3 p

{

text-align:left;

}

That's it!

some text some text some text some text some text some text some text some textsome text some text some text
some text some text some text some text some text some text some text some textsome text some text some text
some text some text some text some text some text some text some text some textsome text some text some text

in other words boxes are the parent divs and "P" are child classes.

It can be much longer, using both divs and classes, like:

#contentpane #content_bottompane p {}

make sure you put "#" (or div) before ids and ". " before classes.

the idea of that concept goes far to a place where you can use one css for a few html files. you can see a live demo of it in the css of the containers of that website.(use firefox developer toolbar add on.)

Good luck!

 

posted @ Saturday, September 22, 2007 8:52 AM by Avi A

comments

Name (required)

Email (required)

Website

Enter the code shown above: