I am in the process of introducing myself to react bootstrap. So far I have the following in npm:
npm install react-bootstrap bootstrap
From there, I have made my parent element in App.js
a container:
import React from 'react';
import {Link, Route, BrowserRouter, Switch} from 'react-router-dom'
import 'bootstrap/dist/css/bootstrap.min.css';
function App() {
return (
<BrowserRouter>
<div className="App container">
...
</div>
</BrowserRouter>
);
}
And I also have bootstrap imported according to the reactBootStrap documentation:
import 'bootstrap/dist/css/bootstrap.min.css';
Next, I have edited my index.css
so that my my container class has a white background and my body has a teal background:
body {
background-color: teal;
}
.container {
background-color: white;
}
The issue I'm having is that my entire page shows a white background. When I open up inspect, it shows that my body did have a teal background-color
, but it was overridden, but I am not sure when in my code it was overwritten. Does anyone have any experience with such an issue? My goal is to have a white container, with a teal background on either side of the container when I view my page.