I'm having troubles with the site i'm creating, whenever i adjust the web page(ctrl + mouse wheel), all the elements were moving out of their places. I don't know and how do i fix this?

4 Years
Discussion Span
Last Post by Sam367

A simple solution would be to place all the elements inside a division that has a fixed width


But what if i'm not comfortable with the fixed width and i want to change it a little? Little to my desired look?


what I meant by fixed width is the width attribute of the division has a set value i.e. width:700px; which you can freely change or do you mean that it should have dynamic changes whenever the user zooms or scrolls?


No, it will not change or move out of their places when the user adjust, zoom, scroll or whatever you call it. Cause it's like this.. For example i have a logo and beside right of it is a text word "mcdonalds" that has a margin-left from the logo of 5px. Whenever i adjust the page, zooming out(ctrl + mouse wheel), the word is like moving out of its place like getting to nowhere. Like 500px wide from the logo.


ok then same answer as before, put every element in a division
it'll look something like this

            <div id = "main">
                <div id = "logo">...</div>
                <div id = "text">...</div>

where in its css the width of main is constant e.g. 900px

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.