I have a printable stylesheet that I need to edit. The articles that are using the stylesheet have markup like this:

<a href="img.jpg" class="thickbox"><img src="img_thumb.jpg" />Caption Here</a>

Because they are using thickbox, they would like the thumbnails taken out of the printable version. However, setting:

a.thickbox img {
    display: none;
}

gets rid of the image and link, but doesn't get rid of the caption. I tried using

<a href="img.jpg" class="thickbox"><img src="img_thumb.jpg" /><caption>Caption Here</caption></a>

but they're CMS takes out the caption tags. I'm sure I could set it to stop doing that, but I'd rather just find a quick and dirty way to cause the text node within the anchor to stop displaying.

Anyone know a CSS-only way to do this?

2 answers

Paul W 5
1
point

Never mind, I'm an idiot....

for those who are also idiots, I just had to change my css rule this:

a.thickbox, a.thickbox img {
    display: none;
}
Answered over 7 years ago by Paul W
1
point
a.thickbox {
display: none;
}

should do it too.

Answered over 7 years ago by Gavin Cheyne