Skip to content

Commit 67d2197

Browse files
Made Navbar Sticky
1 parent 944d267 commit 67d2197

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { Component } from "react";
2-
import CovidApp from "./components/CovidApp";
3-
import Paper from "./components/Paper";
2+
import { Route, Switch } from "react-router-dom";
43
import "./App.css";
4+
import CovidApp from "./components/CovidApp";
5+
import Help from "./components/Help";
56
import Navbar from "./components/Navbar";
6-
import { Switch, Route } from "react-router-dom";
7+
import Paper from "./components/Paper";
78
import StaySafe from "./components/StaySafe";
8-
import Help from "./components/Help";
99
import Symptoms from "./components/Symptoms";
1010

1111
class App extends Component {

src/styles/NavbarStyles.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export default {
3737

3838
nav: {
3939
marginTop: "7rem",
40+
position: "-webkit-sticky",
41+
position: 'sticky',
42+
top: "5rem",
4043

4144
[sizes.down("md")]: {
4245
marginTop: "2.5rem",

0 commit comments

Comments
 (0)