I have different anchor tags with href=#ids and I need to hide them using a general css rule for all of them,
Content xxxxxxxxx <a href="#tab1">Table 1</a>.Content xxxxxxxxxxxx <a href="#tab2">Table 2</a>
I was trying to use something like this:
#wrap a='#tab1'{
display:none;
}
Any idea how to do it?
If you want to hide all a tags which have href set, you can do this:
Try using
a[href*="#"] {display: none;}
This selectors identifies a # in thehref
attribute of an anchor and if found it applies the styleYou can use it in another way such as
header a[href*="#"] {display: none;}
So you don't mess all the anchors on the site!Assuming
#wrap
is an id of a parent, you can use:Try using attribute selectors:
Or even simply
http://www.w3.org/TR/CSS2/selector.html
Why not just create a CSS class for your anchors and hide them using that class?
And in your CSS:
All the anchors you'd want to hide would just use "class='hiddenTab'"