I'm sure this is a simple oversight on my part, but I can't figure out why my CSS called background won't display.
I'm doing a simple addition to the body tags in an external CSS sheet. I have:
body
{
margin:0;
padding:0;
background: #133b6b url('/Images/background.jpg') repeat-x;
}
I'm using Visual Studio .NET Web Developer 2008 Express Edition as my development environment. When I view the results in Visual Studio's design view, the background shows up fine. However, as soon as I try a web preview, the background is not displayed. I tried 'viewing background image' and it said it was not found.
First and foremost, I know my code is correct. I called the style sheet properly on the page. I tried making the background image its own class and using the <body class="custom"></body> technique and that doesn't work either! I have a basic file system. 'Week 1 Assignment > Images > background.jpg'
I really have no clue why this isn't displaying. I've done this plenty of times and this has never happened before
EDIT: The css code snippet is successfully changing the background color, just not displaying the image.
EDIT 2: FIXED by adding ../ before the word Images. Of course it was something simple. Feel free to delete this topic.
This post has been edited by Vaune: 01 November 2009 - 01:07 PM

New Topic/Question
Reply


MultiQuote






|