Issue In order to use CSS3 Media Queries to create a mobile version of my website, I’m gonna create a seperate css file used for small screen devices. If I don’t use pipeline compressor in django, I would just add
Continue readingTag: media-queries
Why is CSS Media Query Not Working On Django?
Issue I’m trying to implement the mobile view of my Django project but the media query part of my CSS seems not to be working in the django project. Given that I made a div container to display flex, with
Continue readingMedia query not working without !important
Issue My media query does not override the regular CSS unless I use !important all the time. What’s the error? Here you can see the CSS with the !importants. If I remove them, the styling goes back to the regular
Continue reading@media print doesn't override main style
Issue In my page I have a left sidebar and a container, container has a margin-left because the sidebar is absolute positioned. Now for printing I hide the sidebar and restore the margin-left of the container, but the margin is
Continue readingcan i have multiple media queries for size of rows in grid-auto-rows?
Issue i’m building a website in grid and i would like to be able to define the height of rows at several break points (browser sizes), but so far i’m only able to define two. this is the default: .container
Continue readingHorizontal scrolling in mobile view in html/css
Issue I am working on a fiddle in which I want to horizontally scroll the contents in a mobile view. At this moment in a desktop view, they are aligned in a straight line as shown below: I want the
Continue readingWhy does the content disappear when media query activates?
Issue I’m creating a base HTML template for a responsive website, the media query works, but the content related to that screen size disappears. This is my code: html, * { margin: 0; border: 0; box-sizing: border-box; color: white; }
Continue readingFlexbox changing text and image position when on a certain width
Issue Okay guys I have a challenge, can’t seem to figure it out. I have 3 images with text that have to show next to eachother, but when at screen (max-width: 768px) the images have to show under eachother with
Continue readingWhy are my CSS3 media queries not working on mobile devices?
Issue In the styles.css, I am using media queries, both of which use a variation of: /*–[ Normal CSS styles ]———————————-*/ @media only screen and (max-width: 767px) { /*–[ Mobile styles go here]—————————*/ } The sites resize to the layout
Continue readingProblem with a very simple responsive page (Coursera Assignment)
Issue I am currently studying HTML, CSS, and JS on Coursera. I have been given the assignment to reproduce a responsive webpage using very simple HTML and CSS without using frameworks, grid, flex, and JS. I have mostly finished coding
Continue readingWhy is my media query affecting every width and not just targeting the (max-width: 860px) which I set?
Issue I was styling a website and I had it just as I wanted until – I added the media query… It’s only one media query targeting devices 860px and smaller (max-width: 860px)… However the media query somehow is taking
Continue readingProblem with VSC , live server and media queries
Issue simple video of my problem My media queries wont work at all so I create the most simple test to show up my issue. but its work here with the snippet … but not locally with VSC … Why
Continue readingMedia-queries not working on Sass project
Issue I am working on a Sass project and everything worked properly, but media queries are not working. I tried adding them at the bottom of the document, adding in the chain of labels, having more specificity than the normal
Continue readingDisplay NavBar on top of each other in smaller screens
Issue For @media (mobile, tablets) only. -Only when the Size of the Page gets smaller, on smaller screens besides PC! I want to display my Logo on Top Middle, (when the screen gets smaller) The NavBar under the Logo as
Continue readingDetect if a browser in a mobile device (iOS/Android phone/tablet) is used
Issue Is there a way to detect if a handheld browser is used (iOS/Android phone/tablet)? I tried this with the goal to make an element half as wide in a browser on a handheld device but it doesn’t make a
Continue readingIs it possible to emulate orientation in a browser?
Issue As the title is it possible to emulate orientation in google chrome or firefox? Meaning somehow change the browser to support media query (orientation = (landscape or portrait)) I have a emulator for mobile, but I would like to
Continue readingMobile and Desktop media query priority
Issue I’m a beginner in front-end web development. I want to know the order of priority when writing CSS media queries in desktop first approach. Do i write mobile queries first and tablet queries below it, in this manner: /*Desktop
Continue readingmedia-queries problem buildind portfolio-website
Issue hi guys i’m a bit newbie in web dev and i’m trying to build my portfolio website as training project, i structured it in desktop mode and when i begun using media-queries for responsiveness i encountered some problems, in
Continue readingSafari doesn't calculate rem units correct when scaling with @media (width/height/background-size)
Issue When using rem as units in css, scaling doesn’t really work in Safari (both PC and Mac). Example located at http://jsfiddle.net/L25Pz/3/ Markup: <div> <img src=”http://www.google.com/images/srpr/logo3w.png” /> <p>Lorem ipsum dolor sit amet</p> </div> CSS: html { font-size:62.5% } div
Continue readingcan't change h1 font-size in print preview
Issue 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%; background-color: rgba(0,0,255,.2); font-size: 100%; min-width: 500px; } header, footer{ background-color:#0066FF; padding: 1%; margin: 1%; } header h1{
Continue readingMobile and Desktop media query priority
Issue I’m a beginner in front-end web development. I want to know the order of priority when writing CSS media queries in desktop first approach. Do i write mobile queries first and tablet queries below it, in this manner: /*Desktop
Continue readingDetect if a browser in a mobile device (iOS/Android phone/tablet) is used
Issue Is there a way to detect if a handheld browser is used (iOS/Android phone/tablet)? I tried this with the goal to make an element half as wide in a browser on a handheld device but it doesn’t make a
Continue readingResponsive Media Query for a Submenu
Issue I’m learning Responsive Media Query, I would like to do two things: Remove arrow icon Adapt the submenu, I guess I just have to decrease the font size? Here is an illustration below: How to remove this icon, please?
Continue readingDisplay NavBar on top of each other in smaller screens
Issue For @media (mobile, tablets) only. -Only when the Size of the Page gets smaller, on smaller screens besides PC! I want to display my Logo on Top Middle, (when the screen gets smaller) The NavBar under the Logo as
Continue readingIs it possible to emulate orientation in a browser?
Issue As the title is it possible to emulate orientation in google chrome or firefox? Meaning somehow change the browser to support media query (orientation = (landscape or portrait)) I have a emulator for mobile, but I would like to
Continue readingWhat is the benefit of using the Angular Material BreakpointObserver API over a simple Media Query?
Issue I’ve been experimenting with Angular Material and found myself questioning the benefit of using the built in BreakpointObserver API over a simple media query? Or rather than being more beneficial it really comes down to what you want to
Continue readingmedia queries css syntax error, shows in sublime text
Issue this is not sublime problem, my code @media(min-width:801px){ margin: 0 auto; margin-top: 40px; margin-left: 370px; } shows in sublime the margin is in white color.. then I test in my browser, and as expected, the css doesn’t apply.. the
Continue readingMedia query to detect if device is touchscreen
Issue What is the safest way, using media queries, to make something happen when not on a touchscreen device? If there is no way, do you suggest using a JavaScript solution such as !window.Touch or Modernizr? Solution Nowadays, CSS Media
Continue readingMedia query not working when I change the screen size
Issue Here’s the CSS of div I am trying to get to change on max width 800px. I don’t understand what I am doing wrong, the same query of max width works for other container divs. @media(min-width :800px){ .bodyForClient{ background:
Continue readingWhat is the utility of the media attribute in the Link tag?
Issue 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 media attribute will be enough to set
Continue readingGrid | responsive, optimization, media query
Issue Ok so I have a responsive grid, and im trying to figure out how I can make certain squares line up, or be placed in different positions, on certain Reponses. I am wanting to mimic these photos EXACTLY: Desktop
Continue readingGrid | responsive, optimization, media query
Issue Ok so I have a responsive grid, and im trying to figure out how I can make certain squares line up, or be placed in different positions, on certain Reponses. I am wanting to mimic these photos EXACTLY: Desktop
Continue readingMedia query not working when I change the screen size
Issue Here’s the CSS of div I am trying to get to change on max width 800px. I don’t understand what I am doing wrong, the same query of max width works for other container divs. @media(min-width :800px){ .bodyForClient{ background:
Continue readingMedia query not working when I change the screen size
Issue Here’s the CSS of div I am trying to get to change on max width 800px. I don’t understand what I am doing wrong, the same query of max width works for other container divs. @media(min-width :800px){ .bodyForClient{ background:
Continue readingHow to stop centering a div as soon as it hits the edge of the screen
Issue 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 enough space available but when
Continue readingHow to stop centering a div as soon as it hits the edge of the screen
Issue 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 enough space available but when
Continue readingHow to override css prefers-color-scheme setting
Issue 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 following CSS media rule: @media (prefers-color-scheme: dark) { body { color:#fff;
Continue readingHow to override css prefers-color-scheme setting
Issue 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 following CSS media rule: @media (prefers-color-scheme: dark) { body { color:#fff;
Continue readingCan media queries resize based on a div element instead of the screen?
Issue 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 widget within the webpage,
Continue readingCan media queries resize based on a div element instead of the screen?
Issue 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 widget within the webpage,
Continue readingCSS media queries: max-width OR max-height
Issue 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’t work */ @media screen and (max-width: 995px OR max-height: 700px) {
Continue readingCSS media queries: max-width OR max-height
Issue 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’t work */ @media screen and (max-width: 995px OR max-height: 700px) {
Continue readingprefers-color-scheme default styles vs light
Issue Can i use: @media (prefers-color-scheme: light) { color: pink; } @media (prefers-color-scheme: dark) { color: pink; } instead of: color: pink; @media (prefers-color-scheme: dark) { color: pink; } I know it’s good to leave support for older browsers. But
Continue readingWhy do my hover effects stop working when my media queries kick in
Issue I’ve been playing about with media queries in hopes of getting my head around creating a responsive page. I seem to have got it working but I’ve noticed that my hover effects in the navbar <li> items are no
Continue readingWhy do my hover effects stop working when my media queries kick in
Issue I’ve been playing about with media queries in hopes of getting my head around creating a responsive page. I seem to have got it working but I’ve noticed that my hover effects in the navbar <li> items are no
Continue readingprefers-color-scheme default styles vs light
Issue Can i use: @media (prefers-color-scheme: light) { color: pink; } @media (prefers-color-scheme: dark) { color: pink; } instead of: color: pink; @media (prefers-color-scheme: dark) { color: pink; } I know it’s good to leave support for older browsers. But
Continue readingMedia Queries: How to target desktop, tablet, and mobile?
Issue I have been doing some research on media queries and I still don’t quite understand how to target devices of certain sizes. I want to be able to target desktop, tablet and mobile. I know that there will be
Continue readingmedia queries in css not working in phone devices
Issue I am trying to create a web page and I’ve added some media queries for managing how the website looks depending on the width of the device. The problem is that, for example, a media query set to affect
Continue readingHow to detect if the OS is in dark mode in browsers?
Issue 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 Dark Mode in Safari/Chrome/Firefox?
Continue readingDifference between srcset and media query?
Issue What is the difference between srcset and media query? Which is better and when to use them? Thanks! Solution srcset lets you load different (content) images depending on the media. media queries let you apply different CSS rules depending
Continue readingHow can I pick one of two image sizes using CSS functions, not media queries?
Issue I have the following CSS, which produces a side-scrolling gallery of images that fits one image to screen width at viewports of up to 500px, and two above that. How can I rewrite it to use CSS functions instead
Continue readingHow to fetch aspect ratio within HTML and CSS?
Issue Responsive website depends on @media queries which takes value in terms of pixels or screen type. Is there a way to set media query using aspect ratio of the screen that is being used? How? Also how to fetch
Continue readingMedia Queries: Target all high resolutions displays
Issue I am working on a future proof fluid website and dont agree with the following: @media only screen and (-webkit-min-device-pixel-ratio: 2) , only screen and ( min–moz-device-pixel-ratio: 2) , only screen and ( -o-min-device-pixel-ratio: 2/1) , only screen and
Continue readingMedia query syntax for Reactjs
Issue How do I do the following CSS media query in Reactjs? .heading { text-align: right; /* media queries */ @media (max-width: 767px) { text-align: center; } @media (max-width: 400px) { text-align: left; } } I tried the following but
Continue readingthe 1px gap when using min and max with media queries
Issue I have been dealing with an issue with min and max width usage in the last few years with websites I am developing for the company I work for. Though I can easily get around this by just changing
Continue readingcss level 4 @media queries not working as expected
Issue I just started learning CSS media queries and as the mdn documentation says In Media Queries Level 4 this can be written as: @media (width <= 30em) { … } but when I try the same it gives an
Continue readingWhy Media Queries not working in Angular8
Issue I am running an angular app on CLI version 8. Everything was working fine last time I checked my code to github and build for production. But now when I try running it on localhost there seems to be
Continue readingApplying borders on elements depending on device size with bootstrap
Issue I’m using bootstrap to create a mobile first responsive layout and have various rows and columns set up that I adjust for the different categories of screen size. I am wondering if there are pure bootstrap styling classes that
Continue readingHow can I make the check button work in CSS?
Issue I’ve tried to design the checkbtn using css but its failing to work. The check psuedo elements and the hover elements seem not to be working, am actually trying to make a hamburger button for the navigation any ideas
Continue readingDefault CSS overriding media query
Issue I’m getting this from Chrome ADB plugin, connecting to my phone via USB. Basically allowing me to inspect elements on my android chrome and view or alter them on my connected PC. I am getting this strange issue. I
Continue readingresize font-size of direct child which has class fs-5
Issue I am using a media query where I indicate that based on the pixels I want all direct children (hence the p’s) of the div to have a specific font-size. Among these there is a p which has class=fs-5.
Continue readingGenerating CSS media queries with javascript or jQuery
Issue Is it possible to create full media query rules on the fly using Javascript or jQuery? I’ve used numerous media queries to target generalised viewports and specific devices/screens using inline CSS, imports and linked files: @media screen and (min-width:400px)
Continue readingAngular 6/7 css media queries are not applied on grand-child
Issue I’m having some issues on apply media queries (for responsive behavior) on an app that it’s using the following component’s architecture base components: It uses default encapsulation, there is where external plugins are used, at the moment we’re applying,
Continue reading