Reputation: 123
I have two <div>
-s in a page arranged side by side with width defined in percentage say 75%
and 25%
. Everything goes well in 100% browser zoom , but as soon as I zoom in one <div>
falls down. How to prevent this?
If it can't be prevented for ALL zoom sizes then can I detect that my <div>
has fallen and give the user an alert possibly to zoom out?
Upvotes: 0
Views: 114
Reputation: 697
It should zoom just fine. Put a "float:left" on your 75%/left DIV and a "float:right" on your 25%/right DIV...or vice versa. Example:
<div style="width:75%; height:200px; background:#333; float:left; position:relative;"></div>
<div style="width:25%; height:200px; background: #999; position:relative; float:right;"></div>
Upvotes: 0
Reputation: 841
You could set a min-width
for your body
which would make the page scroll instead of resizing.
Upvotes: 1