I tried different things for the first element to set its display property to lock, the rest should be set to none. But I canβt get only the first appearance of the element, every time I use the selector, I get all the elements or none of them. Maybe some of you know some CSS tricks to solve my problem.
Here is my code:
<div class="some_class"> <p>...</p> <p>...</p> <p> <object height="300" width="480"></object></p> <p> <object height="300" width="480"></object></p> <p> <object height="300" width="480"></object></p> <p>...</p></div>
I need to get the first view of the "object". I cannot change the HTML and find a way to solve this problem using a good CSS selector. Does anyone have an idea?
I tried code like: .some_class p > object:first-of-type but in this way each "object" is selected ... because each "object" is the first of its kind to its parent "p".
source share