Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

How to Underline hyperlinks ONLY within Joomla Articles?

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

I am trying to underline the hyperlinks but only within the body text of a joomla article. What I keep trying underlines the menu items, categories, etc...

On this page I am hoping to only underline the body text which on this particular sample page only consists of the words "During this winter":

www.anchorpointfilms.com/blog/health/44-emotions-and-the-common-cold

I am sure it is something very basic that I am missing!

AND...

I would sure also like to know what I am doing wrong on the category pages where I am now trying to make the hyperlinks white within the Read More buttons at :

www.anchorpointfilms.com/blog/health

Sean
  • scarney's Avatar
  • scarney
  • LIfetime Developer - Big Bamboo
  • 896 posts
  • 11 Thanks
  • Karma: 1
Last Edit: 6 years 6 months ago by scarney.
The administrator has disabled public write access.
Hi Sean,

you have a missing bracket

a:active {
color: #3644D9;
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
If you wanted something to apply to this page try adding

.itemid-597 article a {text-decoration: underline}

Cheers
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
and if you wanted the hover removing it

.itemid-597 article a:hover {text-decoration: none;}

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Thanks Paul for finding that bracket. Sorry about that. (I just commented out all my suggested changes. What I am really wanting is the following:

1) I want to underline all the hypertext links within my joomla articles and not underline hyperlinks in menu items, or anywhere else for that matter.

2) I want to change the color of hyperlinks within the .btn buttons to remain white which is a different color than the other hyperlinks.

Sean
  • scarney's Avatar
  • scarney
  • LIfetime Developer - Big Bamboo
  • 896 posts
  • 11 Thanks
  • Karma: 1
Last Edit: 6 years 6 months ago by scarney.
The administrator has disabled public write access.
1) Try adding

.article-content a {text-decoration: underline}
.article-content a:hover {text-decoration: none;}
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: scarney
If added now the links will disappear with not having a background so

.pagenav li a {color:#fff; background:red}

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The following user(s) said Thank You: scarney
Ah... duh... I was putting article-content in my attempts without the dot in front!

I knew it would be something missing on my part!

Thanks!!!!
  • scarney's Avatar
  • scarney
  • LIfetime Developer - Big Bamboo
  • 896 posts
  • 11 Thanks
  • Karma: 1
The administrator has disabled public write access.
No worries

That is actually quite easy to get confused on given html5 stuff

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Thanks again Paul, as usual.

I did not understand what this was going to accomplish:

".pagenav li a {color:#fff; background:red}"

I put it into my css and tested but did not know what I was looking for.

Would you mind giving me another clue what this was to help me with? I figured it might be the buttons?

Although, it looks like it is for my menus.

Sean
  • scarney's Avatar
  • scarney
  • LIfetime Developer - Big Bamboo
  • 896 posts
  • 11 Thanks
  • Karma: 1
The administrator has disabled public write access.
ah my mistake - sorry

I thought you meant the page navigation buttons on the article
< >

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
with the readmore buttons on

"I would sure also like to know what I am doing wrong on the category pages where I am now trying to make the hyperlinks white within the Read More buttons at :"

Aren't they white currently?

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Yes, they are white. I commented out some of the css that I had been trying which made them change color and just used your suggested CSS for the underlines. That is actually all I will need so I am not going to bother changing anything. Thanks again, as always for your help!
  • scarney's Avatar
  • scarney
  • LIfetime Developer - Big Bamboo
  • 896 posts
  • 11 Thanks
  • Karma: 1
The administrator has disabled public write access.
ah cool :)

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers