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

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

This widget could not be displayed.

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 {   }
 
This widget could not be displayed.

For me, it works with this:

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

 

 

This widget could not be displayed.

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

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published Aug 14, 2018 in Confluence

Add-on evaluation with confluence templates

Atlassian market place contains number of Apps/Addons which improves the capability of out of the box Atlassian products. It is good to follow a plugin evaluation process before install add-ons. So t...

173 views 12 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you