kriasoft / kriasoft/react-firebase-starter

How to use background-image from style.css

Open
#224 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.5k
Forks
752
PR merge metrics
No merged PRs in 30d

Description

I placed my image in `public/bg.jpg`. I want to make this a background image to my `src/home/style.css`.

**src/home/style.css**
```
body {
background-image: url('swing.jpg');
}
```

**src/home/index.js**
```
import React, { PropTypes } from 'react';
import Layout from '../../components/Layout';
import s from './styles.css';

class HomePage extends React.Component {
render() {
return (


);
}

}

export default HomePage;

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the asset location at public/bg.jpg with the stylesheet referenced by src/home/index.js, then inspect src/home/style.css and the rendered HomePage in a browser. Done means the page visibly uses the image as its background without breaking the existing stylesheet import.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.