Elements not responding as expected
I have added a few elements to a page but the elements respond erratically when page is resized.
How do I set the relative position?
The responsiveness of the site can be controlled using media queries. Brad outlines an example of how to implement this into your experiment in this Optiverse thread. Using this method, the elements on your site will dynamically rearrange as the screen is resized. More information about media queries is also in this support article.
Does this help you achieve what you're looking for?
Sr. Technical Support Engineer
Optimizely | EMEA
Drag the sides of your browser to determin where you are getting breaks with your console open. From that point, set media queries - this link contains all the different devices you might encounter:
In addition, if you're in a rush, you might want to consider just targeting desktop devices for now with your current experiment:
/* * FROM OPTIMIZELY * Usage * Specifies window size (in pixels) to target visitors. */ //target desktop viewports //matches CSS media queries for height/width or max/min-height or -width window.innerWidth > 1400 && window.innerHeight > 800 //target mobile phones //matches CSS media queries using device-height and device-width screen.width >= 320 && screen.width <= 480 && screen.height <= 640