Search
 
SCRIPT & CODE EXAMPLE
 

CSS

css media queries

@media only screen and (max-width: 1200px){
    /*Tablets [601px -> 1200px]*/
}
@media only screen and (max-width: 600px){
	/*Big smartphones [426px -> 600px]*/
}
@media only screen and (max-width: 425px){
	/*Small smartphones [325px -> 425px]*/
}
Comment

media query

@media only screen and (max-width: 600px) {
  body {
    background-color: lightblue;
  }
}
Comment

css media query

/* BOOSTRAP MEDIA BREAKPOINTS */
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {  
  .selector {
  	background-color:#f00;
  }
}
/* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
@media (min-width: 768px) {}
/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {}
/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {}
Comment

media query in css

 /*Any Mobile Device*/
@media only screen and (max-width: 767px) { }
 /*Tablets Device*/
@media only screen and (max-width: 991px) { }
 /*ipad Pro  Device*/
@media only screen and (max-width: 1024px) { }
 /*large  Device*/
@media only screen and (max-width: 1200px) { }
Comment

css media query

@media screen and (min-width: 992px) {   
    .greater-than-large {
    color: red;
    }
}
@media screen and (max-width: 576px) { 
    .less-than-extra-small {
    color: red;
    }
}
@media screen and (min-width: 576px) and (max-width: 992px) { 
    .between-small-and-medium {
    color: red;
    }
}
Comment

@media query

// start Device responsive

//mobile sm 320
@media screen and (max-width:374px){

}

//mobile md 375
@media screen and (min-width:375px) and (max-width:424px){
    
}

//mobile lg 425
@media screen and (min-width:425px) and (max-width:767px){
    
}

//tablet 768
@media screen and (min-width:768px) and (max-width:1023px){
    
}

//Laptop 1024
@media screen and (min-width:1024px) and (max-width:1439px){
    
}

//Laptop L 1440
@media screen and (min-width:1440px) and (max-width:2559px){
    
}

//4K 2560
@media screen and (min-width:2560px){
    
}


//end Device responsive
Comment

media query

/* Smartphones and larger (mobile-first) */

/* Tablet portrait and larger */
@media only screen and (min-width: 600px) {}
/* Tablet landscape and larger */
@media only screen and (min-width: 900px) {}
/* Desktop and larger */
@media only screen and (min-width: 1200px) {}
/* Big desktop (4k) */
@media only screen and (min-width: 2500px) {}
Comment

media-queries

/* b/w 577px to 720px screens */
@media only screen and (min-width: 577px) and (max-width: 720px) {
	h1 {
		font-size: 1.0rem;
	}
}
Comment

@media query css

@media screen and (min-width: 320px) and (max-width: 786px) {
	// custom CSS
}
Comment

media query

@media only screen and (min-device-width: 900px) and (max-device-width: 1200px) {
  /* insert styles here */
}
Comment

css media queries

/* Custom, iPhone Retina */ 
    @media only screen and (min-width : 320px) {
        
    }

    /* Extra Small Devices, Phones */ 
    @media only screen and (min-width : 480px) {

    }

    /* Small Devices, Tablets */
    @media only screen and (min-width : 768px) {

    }

    /* Medium Devices, Desktops */
    @media only screen and (min-width : 992px) {

    }

    /* Large Devices, Wide Screens */
    @media only screen and (min-width : 1200px) {

    }
Comment

media query css


media screen and (min-width: 1300px) {
media screen and (min-width: 400px) and (max-width: 700px) {
Comment

media query in css

/* So me write a media query like this */
@media screen and (min-width:746px){
  /* here we will add the stles we want
  for the screen with min -width of 746 px*/
}
/* we can also use something like*/
@media print and (min-width:1024px){
}
/* Here print is for what we will see if we print whats on the screen*/
Comment

html media query

<style>
  .example1 {margin:10px auto; background:deepskyblue}
@media (max-width:600px)
{
  .example1 {width:70px; height:50px}
}
@media (min-width:600px)
{
  .example1 {width:100px; height:50px}
}
</style>
<div id="example1">Hi</div>
Comment

CSS Media Queries

media screen and (min-width: 480px) {
  body {
    background-color: lightgreen;
  }
}
Comment

media query css

@media only screen and (max-width: 768px) { }
Comment

media quries

The @media rule is used in media queries to apply different styles for different media types/devices.

Media queries can be used to check many things, such as:

width and height of the viewport
width and height of the device
orientation (is the tablet/phone in landscape or portrait mode?)
resolutio
Comment

css media queries

@media only screen and (max-width: 1200px){
    /*Tablets [601px -> 1200px]*/
}
@media only screen and (max-width: 600px){
	/*Big smartphones [426px -> 600px]*/
}
@media only screen and (max-width: 425px){
	/*Small smartphones [325px -> 425px]*/
}

Use contextual spacing instead
Comment

media queries

@media screen and (max-width: 480px) { }
Comment

media query new syntax

@media (max-width: 30em) {
  // Styles for viewports with a width of 30em or less.
}
Comment

media query new syntax

@media (min-width: 400px) and (max-width: 600px) {
  // Styles for viewports between 400px and 600px.
}
Comment

media query new syntax

@media (400px <= width <= 600px )  {
  // Styles for viewports between 400px and 600px.
}
Comment

media query methods

1. @media print
{
p
{
font-family: georgia,montserrat;
}
}
2. <link rel="stylesheet" media="screen"
href="/css/screen_version.css">
3. @import "screenstyles.css" screen;
Comment

media queries in css

<!-- Don't forget to include this tag --> 

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<!-- in your html head for media queries to work on all devices -->
Comment

media query css

Squarespace Webdeveloper http://www.fiverr.com/s2/6c4ff21852
Comment

media query new syntax

@media (min-width: 400px) {
  // Styles for viewports with a width of 400 pixels or greater.
}
Comment

media query new syntax

@media (width >= 400px) {
  // Styles for viewports with a width of 400 pixels or greater.
}
Comment

media query new syntax

@media (width <= 30em) {
  // Styles for viewports with a width of 30em or less.
}
Comment

css media queries

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, intial-scale=1.0">
Comment

media query in css

Mobile screen friendly using Media Query
Comment

@media queries

@media (min-width:600px) {
  nav {
    float: left;
    width: 25%;
  }
  section {
    margin-left: 25%;
  }
}
@media (max-width:599px) {
  nav li {
    display: inline;
  }
}
Comment

where to put media query

media query common breakpoints
Comment

PREVIOUS NEXT
Code Example
Css :: align element at right 
Css :: css display table row gap 
Css :: reset css cdn 
Css :: css select labels for checked checkbox 
Css :: how to cover entire div with background image 
Css :: instagram gradient css 
Css :: input number hide arrows 
Css :: css center vertically and horizontally 
Css :: soft box shadow css 
Css :: input date icon color change 
Css :: css overflow truncate 
Css :: tint png white css 
Css :: add google font 
Css :: css if screen size less than 
Css :: how to make gradient backgroud cover whole page in html 
Css :: center text 
Css :: react hide scrollbar 
Css :: perfect circle css 
Css :: watch scss to css 
Css :: font awesome before after 
Css :: css dynamic grid layout 
Css :: circle css with text in the center 
Css :: add glow to image css 
Css :: how to write text on video in html 
Css :: align ionic icons and text css 
Css :: css limit text length 
Css :: how to make a div in top left in css 
Css :: read only easyui 
Css :: cemter absolute elemetn 
Css :: css rules only for mozilla 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =