How do I write text over an image?

How do I write text over an image?
0

#1

I’m trying to work on my portfolio page, but I cant seem to figure out how to put the words “portfolio” on the image I have. I tried the z-index tag as well as other solutions, but nothing seems to work. the word is only under the picture.
Here is my code: https://codepen.io/nhahmed/pen/MoPoMz


#2

You have the same image as both the background image of a div in your css (which is what you want if you’d like to have text on top of it) and also as an element in your html (which is what you dont want.)

Delete the image from your HTML. If you’re looking to make the image take up the entire screen, google “Responsive Full Screen Background” for a bunch of resources… heres one https://www.w3schools.com/howto/howto_css_full_page.asp

If you just want the image to take up the background of one div, not the entire page, google Responsive Background Image in Div.


#3

Thank you I will try that!