Question

I have All-In-One Cufon installed on my website. I like the way it is working at the moment, using Cufon.replace('h1')('h2')('h3')("h4")("h5")("h6")("pre")("abbr");. However, I want the header links to appear using Cufon too. I had it set to ("a") too, but this changed all the links on the website, which now look wrong.

Does anyone have a way of getting the header links to display using Cufon, without using the ("a") tag (which otherwise renders all links in all sizes using the same process)?

Was it helpful?

Solution

Changing Cufon.replace('h1')('h2')('h3')("h4")("h5")("h6")("pre")("abbr"); to the following should work:

 Cufon.replace('h1')('h2')('h3')("h4")("h5")("h6")("pre")("abbr")('h1 a')('h2 a')('h3 a')('h4 a')('h5 a')('h6 a');

or alternately:

Cufon.replace('h1, h2, h3, h4, h5, h6, abbr, pre, h1 a, h2 a, h3 a, h4 a, h5 a, h6 a');

also should work.

The selector a will select all anchor elements, whereas the selector h1 a will select all anchor elements contained within an h1 element. Google CSS selectors and specificity for more info.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top