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
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
Hi Bruce, sorry there was a typo in my answer. Could you please try it again?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks, we are getting nearer. What happens now is that the first of the two images is not displayed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot, tha "simpler" solution works great in IE, Firefox and Chrome
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great! Good to know!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.