Search
 
SCRIPT & CODE EXAMPLE
 

CSS

how to change style based on screen size

.adjust-me-based-on-size{
  margin-left: 15%;
  margin-right: 15%;
}
@media only screen and (min-width: 800) and (max-width: 1200) {
  .adjust-me-based-on-size {

    margin-left: 10%;
    margin-right: 10%;
  }
}
@media only screen and (max-width: 800px) {
  .adjust-me-based-on-size {
    margin-left: 5%;
    margin-right: 0%;
  }
}
 Run code snippet
Comment

PREVIOUS NEXT
Code Example
Css :: antd css import 
Css :: scss sass watch command line 
Css :: how to apply outline to text in html css 
Css :: css rotate 90 degrees 
Css :: remove box shadow css 
Css :: font awesome before after 
Css :: Media query Tablet and smaller 
Css :: how to center divs in css 
Css :: opacity animation css 
Css :: responsive media qurries 
Css :: boostrap pointer 
Css :: how to center an overlay button using flex box 
Css :: how to hide scrollbar css 
Css :: center absolute element css 
Css :: how to link fonts css 
Css :: how to gain full width of a phone website in html and css 
Css :: css box-shadow 
Css :: css table column spacing 
Css :: css no bottom ouline 
Css :: visibility 
Css :: 3 column responsive grid css 
Css :: white border css 
Css :: css background full screen 
Css :: css nth child skip first 
Css :: line through in css 
Css :: scss react 
Css :: how to set background image for button in css 
Css :: iPhone XS css 
Css :: media query for mobile min and max width 
Css :: hover effect button css 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =