News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

text-decoration underline question

Started by njtweb, June 18, 2018, 01:08:08 PM

Previous topic - Next topic

njtweb

Is there any way to have the underline removed entirely for links in posts, maybe CSS? Normally I wouldn't mind but when hyperlinking an image it shows under them as well, text underlines I don't care but under images makes them look odd, (image attached). Thanks ahead of time to all in advance.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sir Osis of Liver

The underline comes from this -

index.php



a:hover
{
text-decoration: underline;
cursor: pointer;
}



If you set text-decoration to 'none', it will remove underline from all links everywhere.  I think you'd have to create a separate class to remove it from specific items.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

njtweb

Quote from: Sir Osis of Liver on June 18, 2018, 01:19:33 PM
The underline comes from this -

index.php



a:hover
{
text-decoration: underline;
cursor: pointer;
}



If you set text-decoration to 'none', it will remove underline from all links everywhere.  I think you'd have to create a separate class to remove it from specific items.

Do you mean index.template.php?

My index.php is only 5 lines of code.

Justyne

Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Illori


Sir Osis of Liver

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

njtweb

Thank you, after looking I found it. I made the change to "none" for that one occurrence and then dumped the file cache and did a shift + F5 but it's still the same underlined.

Justyne

How many and veterans does it take to specify a filepath... apparently the answer is three. :)
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Justyne

Could you give us the entire css file - would be easier to spot it there.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

njtweb

Quote from: Justyne on June 18, 2018, 01:40:33 PM
Could you give us the entire css file - would be easier to spot it there.

Sure, no problem, here it is. Thank you


Justyne

Try taking out the text decoration on a.new_win:hover.

I think that might be your culprit.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

njtweb

I did the same thing as last. Changed underline to none, emptied cache and did Shift F5. No changes show.

Justyne

Are you making your edits in the correct theme? Each of them have a CSS folder. If something is not defined in your theme I think it falls back to using the default - so it's possible you might have something more there.
Ever tried. Ever failed. No matter. Try Again. Fail again. Fail better.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

njtweb

Quote from: Justyne on June 18, 2018, 01:54:33 PM
Are you making your edits in the correct theme? Each of them have a CSS folder. If something is not defined in your theme I think it falls back to using the default - so it's possible you might have something more there.

I only use the default curve theme.

njtweb

Quote from: Kindred on June 18, 2018, 02:01:15 PM
ctrl f5, not shift f5

I'm in Chrome, shift F5 also refreshes. I did do the cntrl F5 in FF but still all underlined.

Kindred

ctrl f5 is a hard refresh. shift f5 is not.


However, since you have chrome...  use the element inspector to figure out specifically what CSS is controlling the section you are concerned with and what you need to change (and how) to affect it.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

njtweb

Quote from: Kindred on June 18, 2018, 02:05:03 PM
ctrl f5 is a hard refresh. shift f5 is not.


However, since you have chrome...  use the element inspector to figure out specifically what CSS is controlling the section you are concerned with and what you need to change (and how) to affect it.

Thank you, found it. It wasn't text-decoration after all. It was this. I changed the color to the same as the background. so now when it's hovered that's the only time you see the line to indicate it's a link.


/* Styling for BBC tags */
.bbc_link:link, .bbc_link:visited
{
   border-bottom: 1px solid #E7EAEF;


Thanks everybody!

Advertisement: