How to fit image size with user browser height


(Jonathan Monette) #1

Hello,

I would like to retrieve the height of the user browser to fit the first page item with it.

I’ve put an example of what I meant

http://klostermannelectric.com/index.html

Thank you


(Hans-Gerd Claßen) #2

have a look over here:


(Jonathan Monette) #3

Thank you for the fast answer, but i dont mean a fix top menu bar like on both example. If you take the example i’ve send, and you resize the browser window the white left square and the right picture will fit with the heigh of the window so when you scroll down you can se it’s flexible with the user browser windows.
Not sure if I explain it right.

Thank you Hans-Gerd


(Hans-Gerd Claßen) #4

ah, create a responsive document in width and height. this’ll always fill 100% of the screen. then use the responsive setting for each element to achieve results that react to scaling …


(Jonathan Monette) #5

This work great to get something full size for the entire scrolling, but i don’t think I can do what i’m expecting with that function. I want an adaptative item to be full screen when you are on the top of the page but as soon as you scroll down you se that the item was full screen.

example the user have a 632 pixel heigh internet browser window I want my item to be that heigh. but my document will be longer than that. so I can’t use this flexible layout on height. Do you get where I want to go with that?

So how can I get the pixel height of the user browser and how can I force my item to have that height?

thank you


(Hans-Gerd Claßen) #6

this is actually not supported by hype.
have a closer look to the link i posted the first time.
it’s kind of a hack and does exactly what you want … the klostermann-page is made using this method …


(Hans-Gerd Claßen) #7

fullscreenStartexample.hype.zip (220.4 KB)

so … i heard the silence :wink:


(Jonathan Monette) #8

Sorry for the non reply :stuck_out_tongue: I was busy yesterday and I tried to understand the code to do that, it’s not easy since I’m not a programer.

I have a version incompatibility problem when I tried to open the last document you send me. (i’m on 3.5.1)


(Freelancer) #9

well done Hans, nice trick


(Hans-Gerd Claßen) #10

3.5.1 is this a beta version? tried to do an update? … mine is 3.5.2 professionell


(Jonathan Monette) #11

No update available on app store and i have Pro… I dont understand :confused:


(Jonathan Monette) #12

I restart my computer and it did ask me for the update. It’s a nice sample document Hans, I will take a close look at it in the next days.

Thank you :slight_smile: