Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to style links in H2 style differently to just text in H2 style?

Ben Vost November 12, 2015

I want to differentiate how links using H2 look from titles in H2. Obviously, when the user mouses over, the fact that there's a link becomes obvious, but it's not a great way to present.

 

B

PS. We've done some tests and H2 seems to be impossible to modify? Even changing the colour with:

.wiki-content H2 a {

   color: red;

}

3 answers

1 accepted

0 votes
Answer accepted
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 13, 2015

That is all no problem.

For link underlines you typically use:

text-decoration: underline !important;

If you want a different line you can also use borders:

text-decoration: none !important;
border-bottom: 3px dotted orange;

If you want underlines to come and go for different link states you can also define different formats for:

.wiki-content h2 a {   }
.wiki-content h2 a:link/a:visited/a:focus/a:hover/a:active {   }
 
0 votes
Ben Vost November 13, 2015

Excellent! Thanks Steffen that works for me. Red is a bit... strident laugh but I'll have a play. I'm no expert with CSS, do you think it would be possible to have a permanent underline for H2 links?

 

B

PS. Yes it is with text-decoration: underline

0 votes
Steffen Heller
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 12, 2015

For me, it works with this:

.wiki-content h2 a   {
color: red !important;
}

 

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events