Here’s an idea (sandbox example link).
Include a phantom div in your footer component that represents the footer’s position that other dom elements will respect (i.e. affecting page flow by not being position: 'fixed';
).
var style = { backgroundColor: "#F8F8F8", borderTop: "1px solid #E7E7E7", textAlign: "center", padding: "20px", position: "fixed", left: "0", bottom: "0", height: "60px", width: "100%", } var phantom = { display: 'block', padding: '20px', height: '60px', width: '100%', } function Footer({ children }) { return ( <div> <div style={phantom} /> <div style={style}> { children } </div> </div> ) } export default Footer
Related Posts:
- CSS reset – What exactly does it do?
- When to use margin vs padding in CSS [closed]
- SVG center horizontal and vertical line
- Can I change Bootstrap button color?
- Is it bad practice to comment out single lines of CSS with //?
- How to draw a half circle (border, outline only) [closed]
- CSS Circle with border
- React.js inline style best practices [closed]
- CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page
- Set parent style via child
- What is the proper way to display a logo with CSS?
- Responsive font size in CSS
- How to make a vertical line in HTML
- Loop inside React JSX
- expected assignment or function call: no-unused-expressions ReactJS
- CSS Font Border?
- How do I change the background color with JavaScript?
- Why em instead of px?
- Vertical Align Center in Bootstrap
- Button Center CSS
- Loop inside React JSX
- Centering a background image, using CSS
- how to render a react component using ReactDOM Render
- Console logging for react?
- How to change the cursor into a hand when a user hovers over a list item?
- not:first-child selector
- CSS: center element within a element
- Fix footer to bottom of page
- How to pass props to {this.props.children}
- what is a parse error and how do I fix it
- force footer on bottom on pages with little content
- Bootstrap NavBar with left, center or right aligned items
- Can you force a React component to rerender without calling setState?
- How to make the overflow CSS property work with hidden as value
- How to push a footer to the bottom of page when content is short or missing?
- Linking to a pdf file with html
- Can I add background color only for padding?
- Change TD border color with HTML or CSS
- How do you Hover in ReactJS? – onMouseLeave not registered during fast hover over
- How to add multiple classes to a ReactJS Component?
- Why adding version number to CSS file path?
- Hide text using css
- Changing the width of Bootstrap popover
- CSS background color not working
- Bootstrap transparent navbar
- jQuery toggle CSS?
- How can I make my footer center to the bottom of the page?
- 100% DIV width is not really 100%
- CSS 3 slide-in from left transition
- Flushing footer to bottom of the page, twitter bootstrap
- CSS selectors ul li a {…} vs ul > li > a {…}
- Render HTML string as real HTML in a React component
- Bootstrap scrollable panel
- CSS checkbox input styling
- Is there a CSS selector for elements containing certain text?
- ReactJS – .JS vs .JSX
- How to place two divs next to each other?
- Background color in input and text fields
- CSS3 opacity gradient?
- CSS3 background image transition
- How to import Google Web Font in CSS file?
- CSS Equivalent of the “if” statement
- How to make div background color transparent in CSS
- footer disappear on some pages frequently
- WordPress Unite Theme: Footer isn’t sticking [closed]
- Load CSS in footer, like your can with JS?
- How to change footer or for different kinds of users in wordpress?
- How to remove footer from just homepage
- With over a page of content the footer remains where the bottom of the screen was at top scroll
- Im having trouble centering menu items in footer due to “flexbox”
- WordPress footer always at the bottom of the screen-page
- Need help removing block of white space between footer widgets and footer [closed]
- Add my footer menu to the header
- How to prevent a style sheet to affect a header.php or footer.php?
- Best use adding user generated JS/CSS to a theme with a plugin
- 100% Width Footer – Custom Child Theme
- How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
- Footer in middle of page in different browers [closed]
- My CSS, footer and header don’t show up!
- draw diagonal lines in div background with CSS
- How can I make a CSS glass/blur effect work for an overlay?
- Warning: Each child in an array or iterator should have a unique “key” prop. Check the render method of `ListView`
- How to place Text and an Image next to each other in HTML?
- How to make HTML element resizable using pure Javascript?
- Inbuilt style for jquery-ui-datepicker
- Modify CSS via Theme Control Panel
- When enqueing a stylesheet, is it possible to remove the type attribute? [duplicate]
- Video size and border radius using a shortcode
- Collapsible button inside a ul list does work in jsfiddle but not in WP
- wordpress in wamp lan doesn’t load css
- JavaScript added as link/stylesheet
- Admin pages missing css
- How to get DEFER or ASYNC attribute to appear when I add a stylesheet with wp_enqueue_style from a plugin? [duplicate]
- Get post format and use it as a CSS class in different spans
- Custom CSS is not working?
- CSS/JS files in WordPress
- How can I fix my theme header for my CSS stylesheet?
- CSS in child theme isn’t working properly
- My custom theme text and content format
- remove author and date from all posts [closed]