Category "media-queries"

On max-width of CSS Media Query

I see the above recommendation for max-width for mobile phone, tabled and screen. Is that a best practice for max-width settings for different devices? If not

Why does my css design look okay on various android screens and bad on iphone devices

I'm trying to design a webpage but it looks okay on android devices but when i use apple mobile devices (iphones) it doesnt follow my css rules and looks bad. i

MediaObserver vs BreakpointObserver - what are the differences?

After doing some searching, I came to realize that I'm supposed to use the Flex-Layout library to make Material-themed UI responsive (as answered here). And acc

JS match.Media with media query range

I am having an issue getting my site to respond to matchMedia query range using media.Match. Updates based on comments: I need to use match.Media instead of CSS

Certain media queries in my code isn't working, any suggestions on how to solve this? For instance the 320px and the 360px media query isn't working

The 320px media query is not working. The 360px media query is not working. But the other media queries are working. Any suggestions on how to resolve this?

Media Query for text-align: center

I'm having some issues with a media query. I'm trying to center text for mobile devices only. I've added the following to my CSS, but it doesn't seem to be doin

How to override css prefers-color-scheme setting

I am implementing a dark mode, as macOS, Windows and iOS have all introduced dark modes. There is a native option for Safari, Chrome, and Firefox, using the fol

What is the utility of the media attribute in the Link tag?

Is there any advantage or improvement to us using the media attribute in the link tag? If so?, then I don't need to use the @media rule in my CSS, using the med

can't change h1 font-size in print preview

I can't change h1 font-size in print preview. although every other property works, the font size doesn't work. body{ margin: 1%; padding:1%; backgrou

How to detect if the OS is in dark mode in browsers?

Similar to "How to detect if OS X is in dark mode?" only for browsers. Has anyone found if there is a way to detect if the user's system is in the new OS X Dar

Can media queries resize based on a div element instead of the screen?

I would like to use media queries to resize elements based on the size of a div element they are in. I cannot use the screen size as the div is just used like a

Trouble getting Conditional CSS with Media Query and Grails

I'm using media queries to import the correct stylesheet (mobile.css or main.css) in my Grails application. If I load the page with my PC, it works fine, when i

CSS media queries: max-width OR max-height

When writing a CSS media query, is there any way you can specify multiple conditions with "OR" logic? I'm attempting to do something like this: /* This doesn'

How to unset image-rendering for Safari 11+ without yielding "property stroke-color doesn't exist" on W3C CSS Validator

To avoid blurry downscaled images in Chrome, I followed GoojajiGreg's answer to use media queries to set image-rendering to -webkit-optimize-contrast on Chrome

How to stop centering a div as soon as it hits the edge of the screen

i want to create a flexible layout, but I have one div which has to have a fixed width of 1000px. the best solution i had was to center the div while there was