Text Decoration not working ::: PORTFOLIO

Text Decoration not working ::: PORTFOLIO
0.0 0

#1

Hello all,
I was trying to put an underline for my h2 element in “CONTACT” section

#contact>h2
{
text-decoration: underline;
}

but it’s not working. Could anyone help me to solve this issue ?

Thanks !!

Here it’s the link to my portfolio that I’m working on
PORTFOLIO


#2

Hey. The > symbol selects direct children of your #contact section. Problem is, the h2 is nested in other two divs, as you can see in the picture below:

Therefore, you either select it more precisely, which in your case would be like #contact > div > div > h2, or less precisely like #contact h2. Be aware that the latter will select every h2 inside the #contact section.

See more here about CSS selectors.


#3

Awesome buddy !! Thanks for you help