<a><strong>linktext</strong></a> issue safari

Hi,

If a link has this markup:

<a><strong>jajaksjkajskajs</strong></a>

The link won’t work, except if you spamclick it for a while. Wordpress generates the markup like this if the user has some bold text that he then makes a link of.

Why is this and how can I fix it? Overflow:hidden? Clearfix?

Fix what exactly?

You don’t have a href attribute so it is not a link but just an ‘a’ element. It won’t go anywhere. If you want a link the add the href attribute with a destination.

If you are talking about a Wordpress set up problem then that’s a cms question rather than html css.

I feel you may mean something else :smile:

Sorry, of course i have an href=) But with the markup structure it seems like i’m clicking the inner element (span, strong etc) rather than the actual link.

Could you give us an actual website?

Anything inside a link will be a link no matter what the tag (unless its another link of course :smile:) ). There is no issue in having a strong tag inside a link except that you will get the styling for the strong tag on the text (if there are any style rules applied to the strong tag of course).

If the issue is that you can’t click the text then that is likely to be another issue where you may have elements overlapping the text from somewhere else.

In older versions of IE it was usual to apply cursor:pointer to inner anchor elements as sometimes they stopped the cursor:pointer showing but they still worked as links.

As Ryan said we may need to see an example to debug further,

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.