Change "Relative to", that DIV Block are behave different

Hi,
i searched in the forum, but could not find an answer that helps me.

I want to change “relative to”, how can i do that.

Why i want to do that:

  1. I want that the background Picture (DIV Block filled with a Background Picture) is zooming when the page is loading. DIV Block is 100% VH, it is the Hero Picture.
  2. Now i want on the Hero Picture another DIV Block 2 with my Heading and some Buttons (centered)
    But i don’t want that the DIV Block 2 is also zooming.

I saw this here:
https://preview.webflow.com/preview/cafe-shop-blank?utm_medium=showcase&utm_source=cafe-shop-blank&preview=f1dda63a4c5fffad3c843e50c081a085

I tried to rebuild it and take care that each setting is the same, but it does not works.
Than i saw that in the example (link above) in one DIV the “relative to” was changed ( in this Div: “st_box” ).
It is not relative to itself (st_box), it is relative to “s1”.

How could you change the “relative to” from “itself” to another one?

Thanks for helping.


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

2 Likes

For an absolutely positioned object to be relative to its parent that parent element should itself have any other position but static. As you can see s1 in your example has position: relative itself, hence all its children will be related to it when set to absolute.

10 Likes

what you mean with “absolute” ?

found it :slight_smile:
i didn’t saw this before, thanks a lot

1 Like

Perhaps you would want to check this out. Webflow is pretty user-friendly but without at least superficial coding knowledge it will be way harder for you to understand why it behaves this or that way.

The best way to start with Webflow is to visit and watch its University courses. They are fun to watch and will explain everything you need to know to be comfortable in WF designer.

2 Likes

yes you are right, i am doing it since a few days. The years before i used Adobe Muse and now i want to use Webflow. I am really happy with it. The University Courses are really great.
But sometimes there is one thing is missing in mind, which would solve what i want to do.

Your Answer make my day, better my night, i was trying it for one hour. “Absolute” was the thing i missed.

Thanks for your help.

PS: webflow is really much better than Muse. I had to start to learn earlier.

2 Likes