Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Making random not so random Reply To: Making random not so random

#192072
LrnWdlr
Participant

Thanks a lot for such an in-depth explanation.

I think I get it now, but, although better than what I had, it’s not quite what I was looking for.

I’d need it to always cover a predetermined width, a % of the window’s width. Imagine I only had two items and the and wanted them to spread out across 90% of the window’s width. It would look something like this: http://i.imgur.com/ZJMlbuD.jpg in this case only the y position would be random.

I think the concept is easier to understand now, right?

If I have a lot of divs they’ll naturally spread out and this is really not a big issue, but when there’s only a few, it doesn’t look very good if half the screen is empty.

If you (or anybody else) could think of a better method I’d really appreciated.

Thanks anyway. ;)