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!
Thanks all. I solved this by moving the background image to the root directory and renaming to a shorter file name. Looks like VS didn’t like the long image name with underscores. Thanks all.