Remove duplicate content using css?

Hi,

I have some HTML which is displaying 2 selects, for example:


<option value="select">Select Option</option>
<option value="select">Select Option</option>

I don’t have access to the actual HTML so I was wondering if its possible to remove one by using CSS?

Thanks!

You can’t remove anything with CSS, but I also don’t think you can hide an option element with CSS (at least, I tried and failed). Can you use JS?

Thanks for the reply. I was thinking of using display: none to remove/hide it, but wondered if I can use a parent selector or nth-of-type to get around it?

I tried that but couldn’t get it to work, which is why I suspect JS is needed here.

You can do it with JS ( jQuery(“.classname”).hide(); )but you need to append classes to your html.

This might help and point you in the right direction.

http://stackoverflow.com/questions/5754114/add-class-to-option-in-select

I have to ask. Why dont you have access to edit the php, html directly?