Relative positioning?


(Massimo Fiorentino) #1

Hi there,

I know this topic has been up here, but most of the time posts have revolved around a particular project and the answers can be very tricky to figure out. So my general question is: Using Hype 3.5, is it at all possible to have a relative position of one element after another?

For instance, if I have a text element that scales to 100% the width of the screen, the amount of text per line then varies from screen to screen, so the bottom of the text element, and therefore, its height varies accordingly. If I then need to place another element underneath it that “follows along”, sticking its top to the bottom of the text element (which varies in height), then I need to place it relatively. Is this at all possible?

Cheers,
Massimo


(Jonathan Deutsch) #2

There’s no specific way to specify relationships between elements like what is possible with css flexbox or ios autolayout (with parent-child a bit of an exception, but I know this is not your intent).

In some cases there’d be a combination of grouping along with setting the right pins/scales in the flexible layout panel that would achieve what you want. With text wrapping this is probably tricker or not possible though.

Alternatively, if it is for some limited cases, you could edit the inner HTML of elements and probably define your own flexbox settings that could do this.


(Massimo Fiorentino) #3

Thank you for your reply. I will look into it.

I am aware, that this might be a tad outside the scope of what was originally intended for Hype to be able to do. But it is just such a great tool not only to create HTML5 animations, but a great tool to create any HTML page with so I can’t help asking. Sometimes I am comparing it too much with other tools such as Macaw… :smile:

Cheers,
Massimo


(KD) #4

I was looking for the same thing, something close to a flexbox container or ios layout constraints. I am thinking I will settle with the breakpoints for now but I would also like a responsive way to push text containers (or other elements) down (on the same z-index) when the user adjust the browser window.


(Jonathan Deutsch) #5

It is always great to ask and give feedback! Being able to push content down or establish relationships is definitely an area missing in our model. (Hype’s origins are more of absolutely positioned animation content then full web page development and it shows here). A lot of user problems do turn out to be features as solutions for subsequent releases.