Problem:
My Client wants me to create a launch webpage for his product such that there should be no scroll on the page, be any browser or window dimensions.
Doubt: Is this possible using CSS and Javascript?
Some Early Diagnosis: This might be a little similar to this or this but the difference is that I want to resize the dimensions of each and every element in a particular ratio and not just adjust the height of a parent DIV.
So, the statement: I need to change the dimensions of each and every element (images, divs, text … all) based on a ratio between the (current window size and a reference window size). Perhaps Javascript might have a cure for this?
Question: How to do this?
Just set the
heightandwidthof<html>and<body>to100%,overflowtohiddenand use percentages forleft,top,widthandheightof elements:These percentages are relative to the containing block, which is, in this case
<body>.Update: To answer another question: scaling of background images is almost not supported yet. When the CSS 3
background-sizeproperty gains ground (see this table), things will be easier. For now, have a look at this answer (yes, that means: more markup).