media-queries

Overwrite !important rule set within media-query? !unimportant?

旧街凉风 提交于 2020-01-15 11:53:22
问题 Imagine this … @media screen and (min-width: 55.5em) { aside[role="attend"] { margin:0 !important; } } @media screen and (min-width: 61.5em) { aside[role="attend"] { margin:0; /* still !important but shouldn't be */ } } Is there any way to overwrite or "remove" the !important declaration so it's not still applied within the higher min-width value? 回答1: No; the way the cascade works, there is no way to undo an !important declaration or make it "unimportant". This is regardless of whether the

External media query for CSS not working in Chrome

痴心易碎 提交于 2020-01-15 09:36:10
问题 I've been playing with using different CSS files, for different browser sizes (to make the code cleaner and easier to tweak). This works fine in Firefox, but not in IE Edge or Chrome: <link rel="stylesheet" media="screen" href="./css/style.css" /> <!-- common css --> <link rel="stylesheet" media="all and (max-device-width: 767px)" href="./css/smaller- screen.css" /> I also tried: <link rel="stylesheet" media="(max-device-width: 767px)" href="./css/smaller-screen.css" /> As a test, I put this

How to Create Mobile-friendly Responsive Menu?

柔情痞子 提交于 2020-01-15 01:52:09
问题 I am new in HTML, CSS and i am trying to make simple responsive menu.After resize the browser menu icon will display and then will click to open menu and.Please check below code.Would you help me in this? Note:I don't want to use bootstrap. body{ margin: 0; padding: 0; height: 100%; } #menu-bar { font-size: 20px; text-align: right; cursor: pointer; display: none; } .menu-logo { float: left; } nav{ width: 100%;text-align: center; } nav ul { background-color: #A4D54C; float: right; font-size:

Media Query for Samsung Galaxy Tab 4 - 7 inch

谁说我不能喝 提交于 2020-01-14 19:26:06
问题 i am targeting my application for various Android Tablet devices. Mainly 10 inch and 7 inch Samsung and Nexus. To target Samsung Galaxy Tab 7 inch used the below media query, 1024x600 px. It works fine in Galaxy tab 2, 3 of 7inch. But not working for Galaxy Tab 4 7 inch. @media only screen and (max-width: 1024px) and (orientation : landscape) { } Samsung Galaxy Tab 4.0 7 inch uses the following screen specification. Which is same for Samsung Galaxy 4.0 10.1 inch Model - SM-T530NYKAXAR. So on

CSS media queries get messed up

馋奶兔 提交于 2020-01-14 10:42:30
问题 it's not some serious question, but i just want to share and get more information with CSS media queries. i find my own CSS media queries very comfortable, but it still has too many flaw in it. Just as we all know that today mobile device is growing so fast, some of them has the same resolution for tablet or even for a laptop. let's get to the case this is my order of my media queries in index.php <!-- Bootstrap --> <link rel="stylesheet" type="text/css" href="style/bootstrap/css/bootstrap

How to control print font size

六眼飞鱼酱① 提交于 2020-01-13 09:02:16
问题 I am allowing my users to print but the output is way too large (I have to manually adjust to about 60% in the print dialog). I use a css media query (below) to control the content and have tried changing the font-size of the html, body{} without any change to the output font size. Printing to Adobe PDF prints correctly Any ideas what I am doing wrong? My Print Link: <a href="#" onclick="window.print(); return false;"></a> My css: @media print { body * { visibility: hidden; } .printme,

css for different screen resolutions?

余生颓废 提交于 2020-01-12 16:44:12
问题 If i check html on 2 different Systems with different resolutions then the view is distorted. Is there any way of calculating the screen width and height at run time ? i lack experience with css but did some research and found about : https://css-tricks.com/css-media-queries/ but there they are suggesting different classes .(if i am not wrong) My question is it possible to get the height and width at run time and use only one css ? something like : .view { min-width :"some how gets computed

css for different screen resolutions?

喜夏-厌秋 提交于 2020-01-12 16:42:33
问题 If i check html on 2 different Systems with different resolutions then the view is distorted. Is there any way of calculating the screen width and height at run time ? i lack experience with css but did some research and found about : https://css-tricks.com/css-media-queries/ but there they are suggesting different classes .(if i am not wrong) My question is it possible to get the height and width at run time and use only one css ? something like : .view { min-width :"some how gets computed

min-width media query not working on ipad?

混江龙づ霸主 提交于 2020-01-12 03:20:47
问题 Why isnt the following media query being picked up on iPads in landscape mode? @media all and (min-device-width: 1000px) { css here } Or @media all and (min-width: 1000px) { css here } I want this css to target any browser which is 1000px wide or over, not just ipads. For this reason id rather work with the 2nd option of min-width not min-device-width if possible. Both versions work fine with firefox on my PC. Thanks 回答1: The iPad is always reporting its width as 768px and its height as

Apply only to IE 11 within media query for screen size

假如想象 提交于 2020-01-10 01:20:10
问题 I currently have following width specific media query. @media only screen and (max-width: 1920px) { .toggleMultiSelect .filter { width: 566px; } } But the width for ' .toggleMultiSelect .filter ' changes in IE from Chrome/Firefox. So basically need to apply different width for the same css class in 1920px for IE. From the Stackoverflow search I found that IE specific behavior can be achieved like below. @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) { .toggleMultiSelect