Last active
November 19, 2022 16:25
-
-
Save dicethedev/f9adf27a919ec24cca89b322e1cd3e1e to your computer and use it in GitHub Desktop.
Write the CSS code for hiding a div with the class hero only on mobile phone and tablet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* mobile device */ | |
@media only screen and (max-width:320px) { | |
.hero { | |
width: 28%; | |
display: none; | |
visibility: hidden; | |
clear: both; | |
float: left; | |
margin: 10px auto 5px 20px; | |
} | |
} | |
/* tablet device */ | |
@media only screen and (min-width: 768px) { | |
.hero { | |
width: 28%; | |
display: none; | |
visibility: hidden; | |
clear: both; | |
float: left; | |
margin: 10px auto 5px 20px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment