Centered text not moving with image

I have a hamburger navigation menu which works when I press it the full size image below drops to let the width and height of the nav menu to work. My problem is I have text in the middle of the full size image, it is not moving down with the image, it is staying in the same possition all the time. The text is done with absolute top, left. Can anyone help me please?

Can’t do much without seeing the code. Try searching for ‘html horizontal and vertical centering’.

Can you post the code/link?

This is the address:

So, are you asking how to get the hamburger menu or about the text in the middle of the image?

If you put this in you mediaquery ,
you can fix the title

 .centered{
    margin-top:40%;
  }

This will drop you text down…

When you click the hamburger menu, and the list drops - the text in the middle “We repair towards satisfaction” centered on the image ( stuck ) does not drop with the image. Click on the hamburger, you will see. I am having thoughts that it may have something to do with the animation being there.

The text just disappears.

This might be a long shot, but have you tried using the header tag rather than div?

Just tried it, it does not work. Thanks for helping though.
I have tried removing the animation, and that doesn’t work. It is driving me insane.

text right at the bottom before button pressed. but fine once the nav hamburger button is pressed

It`s not desepearing in my end?

I was using mediaquery!

.centered has nothing to do with the image but the text in the middle. I keep wondering if there is another way of doing this.

No your right
your img has to be in header

this just triger text,
to go down
but if you can trigger text
you can olso trigger the img,
and set it down as you like…

yes, that is fine, but before you click the nav button the txt is not aligned properly. It is just after you click it, it becomes fine.

scene1
scene2
Does anyone understand what mean with the problem?

I HAVE MANAGED TO FIGURED OUT THE PROBLEM. :slight_smile: :slight_smile:
The relative was in the img
but if you put a div class=“image” before the image and put relative in the css (image) it becomes fine. Do not put relative on just the img in the CSS. A great sigh of relief.

Thank you to everyone who has tried to help me :slight_smile:

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.