I have Two div like :
<div class="circle">
<div class="circle">
and I have a style:
.circle{
width="100";
height="200";
}
In this case I the css apply to first div only is this possible?
My Answer:
Yes, it is possible to apply the style to only the first div with the class "circle" using the :first-child selector in CSS. You can modify your CSS code like this:
.circle:first-child {
width: 100px;
height: 200px;
}
This will apply the specified width and height only to the first div with the class "circle".
Rate this post
5 of 5 based on 4724 votesComments