Last active
June 16, 2020 12:53
-
-
Save kpunith8/b6412b7edd0e01302ba54d93b233d9e6 to your computer and use it in GitHub Desktop.
Sticky Nav Bar - In react with css module using gastby
This file contains hidden or 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
import React from "react" | |
import containerStyles from "./container.module.css" | |
const Container = ({ children }) => { | |
return <div className={containerStyles.container}>{children}</div> | |
} | |
export default Container |
This file contains hidden or 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
.container { | |
margin: 100px auto; | |
max-width: 1000px; | |
} | |
@media screen and (max-width: 1024px) { | |
.container { | |
margin: 100px auto; | |
max-width: 750px; | |
} | |
} | |
@media screen and (max-width: 768px) { | |
.container { | |
margin: 100px auto; | |
max-width: 550px; | |
} | |
} | |
@media screen and (max-width: 480px) { | |
.container { | |
margin: 100px auto; | |
max-width: 300px; | |
} | |
} |
Author
kpunith8
commented
Jun 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment