Last active
December 10, 2015 17:18
-
-
Save charlycoste/4466282 to your computer and use it in GitHub Desktop.
Responsive menu system with media queries
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
body { | |
font-size : 62.5%; | |
} | |
ul, li, a { | |
border : 1px solid #000; | |
border : none; | |
} | |
ul { | |
width : 750px; | |
list-style : none; | |
padding : 0; | |
margin : 0; | |
} | |
li { | |
display : block; | |
float : left; | |
overflow : hidden; | |
} | |
a { | |
display : block; | |
font-size : 3em; | |
line-height : 3em; | |
background : transparent url(http://placehold.it/30) no-repeat scroll 0 center; | |
padding-left : 40px; | |
width : 110px; | |
} | |
@media (max-width: 750px) { | |
ul { | |
width : 100%; | |
} | |
a { | |
background : transparent url(http://placehold.it/150) no-repeat scroll 0 0; | |
width : 150px; | |
height : 150px; | |
padding : 0; | |
margin : 0; | |
} | |
span { | |
height : 1px; | |
width : 1px; | |
position : absolute; | |
overflow : hidden; | |
top : -1000px; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment