Jump to content

CSS disabled links


Neil

Recommended Posts

Hi all, I am trying to build a site for someone and they have asked that i display their blog (held on Blogger) on their website. That's easy enough I used Feedburners Buzzboost app and played with the Css till it looked nice. But then i was asked if i could stop the headlines of the blog posts linking though to their blogger page. I managed to disable all a tags in the div that the rss feed displays in with some JavaScript which i found here: http://radio.javaranch.com/pascarello/2005...6355421179.html. This works perfectly in all browsers and the only issue i have is in IE which colors all disabled links gray ruining my lovely Css styles.I can think of a few ways that might fix this but I'm just not well versed enough to get them to work. so what i need is some advice for one of the following:

  1. a way to color the gray disabled links in IE.
  2. OR a way to override all links and have them refresh the page rather than disabling them.
  3. OR a suggestion of something other than feedburner that gives me the option to send the feed as plain text with the HTML tags removed.

Link to comment
Share on other sites

  1. a way to color the gray disabled links in IE.
  2. OR a way to override all links and have them refresh the page rather than disabling them.
  3. OR a suggestion of something other than feedburner that gives me the option to send the feed as plain text with the HTML tags removed.

Your first question is not possible. At least not to my knowledge. I have tried that before without much luck. You can use the disabled selector to style disabled elements. Unfortunately, IE refuses to change their color:
[disabled] {	...}

Link to comment
Share on other sites

Your first question is not possible. At least not to my knowledge. I have tried that before without much luck. You can use the disabled selector to style disabled elements. Unfortunately, IE refuses to change their color:
[disabled] {	...}

Darn! thanks anyway at very least you've saved me from tearing any more of my hair out trying to color them. I guess it's all down to the other 2 ideas i had unless anyone can come up with a better solution. I also should mention that the hosting plan that my friend has doesn't support databases so i cant use any CMS's like Joomla instead of the blog or host the blog itself on her website
Link to comment
Share on other sites

How are those links generated? Can you add code to them? If so, you can just add an onclick event that returns false:<a href='...' onclick='return false;'>link</a>That will cancel the default action that occurs when it's clicked, meaning it won't redirect to the page. Or I guess if you can modify them you can just modify the href.

Link to comment
Share on other sites

Feedburner's Buzzboost app doesn't let you alter links from their original target. In this case the blogs titles link through to a comments section in blogger.com. The only editable code on the page is some javascript calling up and displaying the rss feed from feedburner. so i cant add code to the links themselves, however I did try something similar to what you suggested, it worked fine but only in Opera.

<script type="text/javascript">window.onload= function(){        DisableEnableLinks(true)}function DisableEnableLinks(){  document.getElementById("blog").onclick="return false;"  } </script>

Though i think even if this did work it would still leave the disabled links gray in IE. Thats when i moved over to using the more detailed code i got here.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...