skip to Main Content

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?

Example zoom for 1366x768 resolution

2

Answers


  1. set the image with and height to 100% on css?

    width: 100%;
    height: 100%;
    
    Login or Signup to reply.
  2. Use the vw and vh units for your measurements. Example:

    h1 { font-size: 0.5vw }
    

    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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search