Background doesn't fill after mount.
See original GitHub issueThe background image does not take the full width after initial load. I have to scroll down a bit to update the component and get full width.
This is a dirty work around we had to make. Maybe there’s a better way or a fix.
componentDidMount() {
// TODO this is a dirty little workaround for fixing the "width-problem"
setTimeout(this.parallax.updatePosition, 500)
}
render() {
return (
<Parallax
ref={(ref) => this.parallax = ref }
bgImage={this.props.bgImage}
strength={200}
blur={0}
>
<div>...</div>
</Parallax>
)
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Why the background image does not fill the entire div
background -size: cover fills up the entire DIV but it doesn't resize when the browser is resized. I actually had to use 100%...
Read more >The Fixed Background Attachment Hack - CSS-Tricks
I want to keep the background gradient in a fixed position on scroll, so let's apply basic CSS styling to the body that...
Read more >image as a background doesn't fill all the page
Since this change, I have a white border all around the page. Did someone know why it doesn't fill all the page like...
Read more >Background Checks - MD Department of Public Safety and
Effective October 1, 2020, all in-state applicant fingerprints submitted to CJIS for the purpose of licensing and/or employment background checks must be ...
Read more >Layers | Style Specification | Mapbox GL JS
The type of layer is specified by the "type" property, and must be one of background , fill , line , symbol ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@saschb2b Does version 1.2.2 also solve your issue?
@RRutsche yes! It works now like a charm. Thank you very much