import React from 'react'
import './App.css'
const App = () => {
return (
<>
<header>
{/* Fixed navbar */}
<nav className='navbar navbar-expand-md navbar-dark fixed-top bg-dark'>
<a className='navbar-brand' href='/'>
Fixed navbar
</a>
<button
className='navbar-toggler'
type='button'
data-toggle='collapse'
data-target='#navbarCollapse'
aria-controls='navbarCollapse'
aria-expanded='false'
aria-label='Toggle navigation'>
<span className='navbar-toggler-icon' />
</button>
<div className='collapse navbar-collapse' id='navbarCollapse'>
<ul className='navbar-nav mr-auto'>
<li className='nav-item active'>
<a className='nav-link' href='/'>
Home <span className='sr-only'>(current)</span>
</a>
</li>
<li className='nav-item'>
<a className='nav-link' href='/'>
Link
</a>
</li>
<li className='nav-item'>
<a className='nav-link disabled' href='/' tabIndex={-1} aria-disabled='true'>
Disabled
</a>
</li>
</ul>
<form className='form-inline mt-2 mt-md-0'>
<input className='form-control mr-sm-2' type='text' placeholder='Search' aria-label='Search' />
<button className='btn btn-outline-success my-2 my-sm-0' type='submit'>
Search
</button>
</form>
</div>
</nav>
</header>
{/* Begin page content */}
<main role='main' className='flex-shrink-0'>
<div className='container'>
<h1 className='mt-5'>Sticky footer with fixed navbar</h1>
<p className='lead'>
Pin a footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar
has been added with <code>padding-top: 60px;</code> on the <code>main > .container</code>.
</p>
<p>
Back to <a href='/docs/4.3/examples/sticky-footer/'>the default sticky footer</a> minus the navbar.
</p>
</div>
</main>
<footer className='footer mt-auto py-3 bg-dark text-white'>
<div className='container'>Place sticky footer content here.</div>
</footer>
</>
)
}
export default App
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify