Image in a headline

Bruce Schlueter November 16, 2011

We have a long page with different headlines and at the end of the headlina an image with a link to jump to the top of the page. Now we also have a toc at the top a of the page which now also displays the images. Is there a way to show only the text of the headline without the images?

Thanks for your input,

Bruce

1 answer

1 accepted

2 votes
Answer accepted
Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2011

You can hide the images by inserting the following CSS into your space or global stylesheet of Confluence:

ul li a[href^="#"] + a img, ul li a[href^="#"] + a + a img {
  display: none;
}

Hope this helps

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2011

Hi Bruce, sorry there was a typo in my answer. Could you please try it again?

Bruce Schlueter November 16, 2011

thanks Remo,

I am new to Confluence and maybe I am going wrong somewhere. What I did is go into the Space Admin and then chose "Stylesheet" and added the lines. But this did not have any effect on the toc. Perhaps I have not described the point precise, I now have pages with headlines and in the same line two images. These pages are included into another page which has the toc and shows all headlines from the included pages with the images. What we would like is that in this toc only text is visible and no image. Your help is appreciated.

Bruce

Bruce Schlueter November 16, 2011

Hi Remo, thanks a lot for the help but this does not help. I have found out that it has to do with the link defined to the image. As soon as I unlink the image it will not be displayed in the toc anymore. Do you have any more ideas?

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2011

Made another small change to the code in my answer. It should now work for image links in the toc. Let me know if this works.

Bruce Schlueter November 16, 2011

thanks, we are getting nearer. What happens now is that the first of the two images is not displayed.

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2011

Sorry, seems like I didn't read your comment properly... I added a CSS selector for the second image link in my answer.

This would be a simpler solution with CSS3, but I'm not sure if it's compatible with your browsers:

ul li a[href^="#"] ~ a img {
  display: none;
}

Hope this works now for you

Bruce Schlueter November 16, 2011

Thanks a lot, tha "simpler" solution works great in IE, Firefox and Chrome

Remo Siegwart
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 16, 2011

Great! Good to know!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events