# CSS->Part 02->Selector & Position

In this lecture, we are going to study the following topics

**Selector**

1. Choose nth-child
    
2. select the first child
    
3. select the last child
    

**Position**

1. Fixed
    
2. Static
    
3. Relative
    
4. Absolute
    

**Selector---&gt;Choose nth-child, first child and last child: -**

We choose any child with the help of 2(n)

where **n** represent the numeric value like 1 ,2 and so on

%[https://codepen.io/ashugautam009/pen/MWBBBxE] 

**Position: -**

**Static Position: -** It is by default the position of each div or element.

Simply no use case

**Fixed Position: -** A element is fixed in HTML in such a way that when you scroll down your web page but that element is always there in its position.

In the below example you can understand better that fix doesn't change its position.

%[https://codepen.io/ashugautam009/pen/dyjgBae] 

**.four class is fixed Position**

**Relative Position: -**

When we want to change a position from its original place then we use Relative. There are some properties which are used like top, right, bottom, and left.

It calculated its changed its position form its original position.

%[https://codepen.io/ashugautam009/pen/gOjBVOy] 

.two and .three class have position relative.

**Absolute Position: -**

Absolute change its position from its parent position.

If we gave absolute to id(#) or class(.) but it does't have any parent than **BODY** will became its Parent of that id or class.

%[https://codepen.io/ashugautam009/pen/QWBZeMK] 

Now I ahve challenge for you make folloeing outout using

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1675232891209/c2ef2718-62e3-486a-8bcd-57037691741b.png align="center")
