Reputation: 2076
My layout is a mess. It works just fine given a certain resolution and I've decided to spread this same layout vertically on mobile clients to avoid further complications. The problem comes when resizing the desktop client. Not every element takes part on shrinking / expanding and the whole website stays desfigurated. I've tried keeping it all via '%' in width and height but does not work as it should anyway
Is there any library that expands and shrinks every element on resize? Keeping harmony between width, height, font-size, whatever. I hardly believe no one has ever developed such a thing like this... Tyvm for your help...
Upvotes: 0
Views: 433
Reputation: 33
To keep everything in the same proporsion when resizing a webpage I always use either % og em/rem.
ex:
width: 100%;
or:
width: 45em;
This way, when users change the zom, the design keeps itself in the same proporsion.
Upvotes: 0
Reputation: 819
Using media queries in your CSS file will help better.
http://www.w3.org/TR/css3-mediaqueries/
Upvotes: 1