- Articles|
- Tutorial|
- Ask|
- Classified|
- Health|
- Wisdom|
- Funzone|
- Blog|
- Entertainment|
- Links
Tutorial Home »» Complete CSS »» CSS Pseudo Child Class
CSS Pseudo Child Class
By Admin | Posted on 08:15 AM , Thursday, Sep 02, 2010 | Posted In Complete CSS
There are the following pseudo classes-
1. :first-child :
The :first-child pseudo class compares to that elements which is the first child of parent element, if it is find then set the changes in the ducuments.
Syntax:
div > p : first-child { text-indent:0; color : #CC3300; text-transform : uppercase}
In the above example symble > shows that 'p' is the first chield of the 'div' element. This class match the first 'p' element of the div parent element, if the matches is successful ,changes will be done.
Example:
<html>
<head>
<title>css pseudo child class </title>
<style>
div > p:first-child { text-indent:0; color:#CC3300; text-transform:uppercase}
</style>
</head>
<body>
<div><p>
The new hind is a global website and the company provides the many types of the services in all the fields. You can gets all types of information such as entertainment, movies, sports. It also tutorials which are moer latest and content full source by which the student of all fields can be updetes his/ her knowledge and get success in the life.
</p>
<h3 align="center">CSS pseudo Child class Example</h3>
<p><h3 align="center">CSS Tutorials Of pseudo Child class </h3><br />
This website newhind.com is that which contains the tutorials on the different subjects.
</p></div>
</body>
</html>
Output:

Please login to download this program.


Loading . . .