media-queries

media query for min-height

旧街凉风 提交于 2019-12-12 10:51:44
问题 I want to write media query based on screen resolution. My screen resolution height is 768. I wrote media query for this as: @media(min-height:768px) and (max-height:850px) { .video-contain{ margin-top:110px; } } My above media query is not working.margin-top is not set before. I wrote media query based for screen resolution but not browser height. 回答1: Use: @media screen and ( min-width: 850px ) and ( max-height: 768px ) { .video-contain{ margin-top:110px; } } NOTE : Always use max-width

What does this line of CSS mean? @media only screen and (min-device-width: 320px) and (max-device-width: 480px)

感情迁移 提交于 2019-12-12 10:38:55
问题 I found the following line of code inside Wordpress' Twenty Eleven theme stylesheet. What does it mean? @media only screen and (min-device-width: 320px) and (max-device-width: 480px) 回答1: It's called CSS3 Media Queries which is a technique to help your website adapt to various of screen dimensions or basically, it helps to deliver different styles to different devices. Since you're new, let's break down your media query to two parts: @media only screen This means we will apply css styles to a

@media and @font-face support in LessCSS

放肆的年华 提交于 2019-12-12 10:29:43
问题 Hello does anyone know how to do a media query with LessCSS? @media screen and (max-width: 600px) { #container{ width: 480px; } } gives me the following error: ! Syntax Error: on line 23: expected one of :: : . # * - [ @media @font-face , { ; got ( after: @media screen and Similarly, @font-face and any CSS3 query with an @ conflict with LessCSS's compiler. Thanks! 回答1: As far as I understand, LessCSS does not support @media, you may find open tickets for that on their github home page. The

CSS Media Queries on Nexus 7, display resolution not working in code

旧时模样 提交于 2019-12-12 08:34:59
问题 I'm working with CSS Media Queries to load different templates for differently sized devices. I created a spreadsheet listing the display resolution of testing devices and the most common devices to come up with the size cut-offs. One of the devices that I'm testing is the Nexus 7 of which I've found the display resolution to be 1280 × 800. However when I use these values in my code, it doesn't work. **the only reason I'm using no max or min is because I'm trying to find the exact resolution.

Media Query for HTML5 App for All Devices

感情迁移 提交于 2019-12-12 07:23:27
问题 Any one Have Idea , about all media queries that will help to detect individual devices such as: iOS,iPhone 5 , iPhone Ratina display , android mobile. , ipad, tablets atc ? 回答1: go for media-queries-for-standard-devices /* Smartphones (portrait and landscape) ----------- */ @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { /* Styles */ } /* Smartphones (landscape) ----------- */ @media only screen and (min-width : 321px) { /* Styles */ } /* Smartphones

Can we make our webpage open defaultly in landscape mode for mobile/tablets using media query/js/jquery?

此生再无相见时 提交于 2019-12-12 07:07:04
问题 Is it possible to make my web page open default in landscape mode in a mobile or tablet even if the orientation of screen is off using css3 media query or jquery ?? 回答1: You COULD do this. Wether it is a good idea or not I'll let you decide (hint: it isn't). Check for portrait orientation with CSS and rotate the body if necessary: @media screen and (orientation:portrait) { body { transform: rotate(-90deg); transform-origin: 50% 50%; } rotating the body in this way will not cause it's width

Problems with media queries

*爱你&永不变心* 提交于 2019-12-12 06:58:03
问题 So I'm building my personal site using bootstrap. Currently I'm trying to make the content fit at the mobile sizes. My problem is I can't quite remember how to use queries and the way I'm doing it stops working at a certain point. So basically what I'm doing is putting the mobile CSS style in the main CSS then altering it as the screen gets bigger. But for some reason the queries stop working after 992px . Is there a better way to do this that will work and make more sense. 回答1: Here is how

Mixing @supports and @media queries

时光怂恿深爱的人放手 提交于 2019-12-12 06:49:59
问题 I'd like to apply a series of styles to browsers that meet two criteria: Are not Internet Explorer. Are a minimum of 1400px. Individually I can handle each: @supports(not (-ms-high-contrast:active)) @media(min-width: 1400px) I'd like to do something like this though: @media(min-width: 1400px) and @supports(not(-ms-high-contrast:active)) Does CSS allow for this in some way? I've noticed that this can be done by nesting directives, but I'm hoping to find a cleaner and more readable solution.

Scaling HTML from transcribed PDF files

可紊 提交于 2019-12-12 05:48:10
问题 I have a few PDF files that were converted to HTML. I fully understand that this isn't ideal, but that's not something I can change. The issue is that it places content at very specific points which breaks mobile responsiveness. A typical HTML will looks like this: <div class="pc pc1 w0 h0"> <div class="t m0 x0 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">Text</div> </div> And the CSS file like this: @media screen and (-webkit-min-device-pixel-ratio:0){ .sc_{-webkit-text-stroke:0px transparent;} .sc0{

media-queries VS. fluid grids FOR different mobile-formats

烈酒焚心 提交于 2019-12-12 05:39:47
问题 This post is not about code-syntax but about work-strategy, before I start developing the site. If I need to design the front-end of a mobile-site for smart-phones (Androids { 3 different sizes}, iphones {2 differents sizes}, and other non - smartphones phones) how shall I proceed? (MY DESIGN HAS TO WORK AND BE THE SAME FOR ALL THESE DEVICES) 1- shall I design my work following the idea about flexible images and fluid grids (flexible DIV:s). or 2- set different media queries-sizes for every