+ 1

H1 tag doesn't show up

I have div inside header. In that div, I have h1 tag with some text. The div has background image applied. H1 tag does not show up on top of that div. I have tried z inxed. Doen not work...Here's code snippet: <div class="introduction"> <h1>Some text</h1> </div> ______________________ .introduction { background: url(../images/bg-5.jpg) no-repeat fixed; background-size: cover; height: 500px; width: 100%; } .introduction h1 { color: white; }

9th Jul 2019, 8:39 PM
Inl Happy
Inl Happy - avatar
7 Answers
+ 2
Removing the class bg-light appears to fix the issue. <nav class="navbar fixed-top navbar-expand-lg navbar-light justify-content-between">
9th Jul 2019, 9:47 PM
Chris Coder
Chris Coder - avatar
+ 3
You're welcome 😊
9th Jul 2019, 10:01 PM
Chris Coder
Chris Coder - avatar
+ 2
Please share your code here https://code.sololearn.com/#html
9th Jul 2019, 9:15 PM
Chris Coder
Chris Coder - avatar
+ 1
You have white on white: Change the text color to something other than white. .introduction h1 { color: white; }
9th Jul 2019, 8:56 PM
Chris Coder
Chris Coder - avatar
+ 1
Thank you so much. Now I see that h1 was right behind the navbar. Thanks again. It helped me a lot. Fixed it.
9th Jul 2019, 9:55 PM
Inl Happy
Inl Happy - avatar
0
Background image is not white. It is black. And i have white h1 on top of that. And when I refresh the page it shows the h1 tag for few seconds, then background image kinda overrides it :/
9th Jul 2019, 8:58 PM
Inl Happy
Inl Happy - avatar
9th Jul 2019, 9:21 PM
Inl Happy
Inl Happy - avatar