question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Background doesn't fill after mount.

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
rrutschecommented, Dec 21, 2016

@saschb2b Does version 1.2.2 also solve your issue?

1reaction
saschb2bcommented, Dec 21, 2016

@RRutsche yes! It works now like a charm. Thank you very much

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found