Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

eslam said
PLUS
eslam said
Courses Plus Student 6,734 Points

offset text over an image

I am trying to make a div exactly in the center of the page and offset text over it using absolute position, it's working fine, but it's not responsive at all, so how can i make the text position stay at the same potion when i resize the screen ? here is an image of something like what i am trying to do https://image.ibb.co/erVbWy/Screen_Shot_2018_07_23_at_6_00_07_PM.png

1 Answer

jamesjones21
jamesjones21
9,260 Points

Why you try z-index? It's there for absolute positioning? Then you need to create media queries to kick in when the browser screen is smaller.