How to use percentage instead of pixels for changing the location of objects


(Jonothan) #1

Jad_SliderIssues.zip (359.5 KB)

As I said in the title, I am having problems making the slider (which I have uploaded), so that when the slider is scaled (It now scales with the browser window), the images inside slide all the way, not just the given 700 pixels. The slider only works at 700 pixels wide, but looks awful any wider! (Just a note, that the slider is just automatically going backwards and forwards, as I haven’t made buttons or slides yet).

Thank you very much for your help!

I’m loving the software, I’m 17 and trying to get to grips with Hype so I can provide nicer looking sites to my clients! Thank you very much.


(Jonathan Deutsch) #2

The restoration from export doesn’t yield me the same document, so it might be useful to post a zip of your .hype instead of the export (unless you made specific changes after the fact?)

So it is hard to say what is happening, but here are a couple hints if you didn’t see:

  • At the top level group, you could instead use “Zoom Contents” which will scale the entire div and means you would not need the flexible layout on individual elements
  • If you need to keep proportions, you can use “Shrink to Fit” or “Expand to Fill” in the Scale behavior
  • The effective way to setup flexible layout similar to a percent based scale is to turn off all pins. This will preserve the proportionality of the x/y position and scaled width/height based on proportions:


(Jonothan) #3

Thank you very much! Fantastic suggestion, it was the perfect solution! What incredible software- and forum!

All the best!


(Ken Heins) #4

The explanations of the differences and uses of Zoom Contents, Shrink to Fit, Expand to Fill are very helpful.

Hey, I didnt want to be the one to admit I didnt totally understand the relationships! I have been able to make things work, but not always knowing why.