Search code examples
cssimagebackground-image

css background image won't display


I have tried everything! But my background image (gif) won't show up..

My files are stored in my public_html on ftp.

I have my file linked like this in my html doc:

<link href="css/arena.css" rel="stylesheet" type="text/css" />

And I have the following lines in css:

body {
background-image: url('../images/2.gif'); 
}

I hope someone can help me out because this is really frustrating.

Thanks in advance.


Solution

  • There is an error in your syntax, you have to remove :.

    url('../images/2.gif) instead of url:('../images/2.gif')

    You could check background-image property documentation.