• Resolved zs33

    (@zs33)


    is there a way to set the content width depending on the ppi of the monitor? i mean the pixel width isnt everything, like my laptop is 1980 and its 15,6 inch, so everything seams smaller… u can get 15,6 with 1200 pixels, and then the content is way too big. how can i go about this?

    @media (min-width: 1000px) {
    .entry-content {
    width:500px;
    margin-left:auto;
    margin-right:auto;
    }
    }

    so far i have got this.
    i would like to set the width depending on the resolution AND ppi of a monitor. is it possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • That shouldn’t be how it works… Might have to do some digging.

    Your laptop should have screen resolution settings. So lets say you have a retina Macbook vs a none retina when you view sites the site shouldn’t show half the size on the retina as a none retina because even though the ppi is different the screen width is the same.

    Basically css should target the resolution of the screen not the ppi. With a laptop you can change that resolution to be bigger or smaller based on preference but that doesn’t effect the actual ppi of the screen.

    Now regardless yes you can have css target higher ppi screens. For example lets say you want to target screens with higher ppi then 1.5 you can have a media query like this:

    @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    }

    Kadence Themes

    Thread Starter zs33

    (@zs33)

    ok thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘width of content depending on ppi of monitor’ is closed to new replies.