Background Image displaying in Design view but not in browser? (Visual Studio 2008)

Posted by Tom Hutchinson on Stack Overflow See other posts from Stack Overflow or by Tom Hutchinson
Published on 2012-11-28T13:50:01Z Indexed on 2012/11/30 11:04 UTC
Read the original article Hit count: 229

Filed under:

I'm new to CSS and this issue in Visual Studio is driving me mad!

I have a background image defined within a simple style sheet...

body {

background-image: url(Images\Greenhouse.jpg);
background-position: center;

}

My style sheet is referenced within the HTML code...

<head runat="server">
<title></title>

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

</head>

The background image shows in design view but in the browser, nothing!

I've tried changing position etc and refreshed the browser, cleared the cache etc. This happens with all my images. Images are within the project folder (\Images) and added to the solution explorer in VS. Tried "", changing image file names etc, nothing is working!

© Stack Overflow or respective owner

Related posts about css