Skip to content

Problem with adding a png background #172

Open
@LightningRpper

Description

@LightningRpper

I'm trying to add in a png called "lightning background.png" as a background to my website. I have the image in app/assets/images and this as my code for the body section of app/stylesheets/scaffolds.

body {
  background-color: #fff;
  //color: #333;
  color: white;
  margin: 33px;
  background-image: image-url('lightning background.png');
  background-repeat: no-repeat;
  background-size: 100%; 
}

However, I am getting an error that says

Error: error in C function image-url: bad URI(is not URI?): "lightning background.png"
        on line 6:21 of app/assets/stylesheets/scaffolds.scss, in function `image-url`
        from line 6:21 of app/assets/stylesheets/scaffolds.scss
>>   background-image: image-url('lightning background.png');

and its pointing me in the direction of line 9 of app/views/layouts/application.html.erb.
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>

What's the issue here and how can I adjust it to give the website more of a proper background?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions