I’m working on website and have to convert from psd(photoshop) file to html and there was one issue that webpage was very big like 3300px x 2800px and I zoom out it 40.881 % to fix website size. And now size is good on 1366×768 resolution, but for example on 1280 x 700 or bigger resolution website is always scrollable horizontally or there are white space in right side.
How can I depend on screen resolution zoom in or zoom out my background?
2
Answers
set the image with and height to 100% on css?
Use the vw and vh units for your measurements. Example:
Would make the font size if a h1 tag half the viewport width of the element that it’s contained in.
The vw adjusts according to width and vh to height.