Jump to content

<span> and de-linking a link


Lodius2000

Recommended Posts

Hi all

 

I am trying to take a link's ability to link away from a link by converting it to normal text

 

ie, I am working on pagination for my blog and the navigation looks like this

 

<< Prev | 1-5 | 6-10 | Next>>

 

its all done in php that i got from a book, but anyway, the script references a span class="inactive"  so that when you are viewing 1-5 both the << Prev and 1-5 links are grayed out, since there is page previous to the page that displays 1-5 there is no need for that to be a link, nor is there a need for 1-5 to be a link since we are already there

 

what i need is the style that would remove the linking property of those links  and i got no ideas, Im bad in php and even worse in css

 

Thanks in advance

Link to comment
Share on other sites

There isn't such a thing. All you do is in your php output, you don't output the anchor (<a>) tags, you just output the text inside them. You can also wrap a span around them as suggested, as that will enable you to style the inactive links in whatever way you want.

 

You could also re-style the link so that the mouse changes to the text bar rather than the hand when it goes over the link, and format the text in black (or whatever the text color is on your site). This won't prevent the links from working, but it will appear to most people that the text isn't a link, even though it really is.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.