Reputation: 311
I have a WordPress plugin which creates an output like this:
<div>[Some Content]</div>
<div>[Some Content]</div>
<div>[Some Content]</div>
<div>[Some Content]</div>
<div>[Some Content]</div>
<div>[Some Content]</div>
All those div's have width:50% and a float:left; So I always have two in a row.
Now I need one div to be at 100% width.
How do I do that?
Upvotes: 0
Views: 118
Reputation: 13978
you can use nth-of-type()
selector to target a particular div. But you should have some parent element.
#parentid div:nth-of-type(2)
{
background:#ff0000;
}
Upvotes: 2