-
Mar 5th, 2012, 05:44 PM
#1
Thread Starter
PowerPoster
[RESOLVED] CSS Element not working???
I have the following CSS Element in my StyleSheet file (IEStyle.css).
Code:
body
{
background-image: url('Images/DSC_0003.jpg');
background-repeat: repeat-y;
overflow: auto;
}
The problem is that the image is not showing up as my background for the <body> tag. The jpg resides in the "Images" subdirectory in my VS project as does it exist on my webserver. What am I doing wrong? Below is what my aspx page looks like with the Style Sheet included in the page.
Code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Main3.aspx.vb" Inherits="BMResume.Main3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Resume of Blake McKenna</title>
<link href="Styles/IEStyle.css" rel="stylesheet" type="text/css" />
Thanks,
-
Mar 5th, 2012, 07:44 PM
#2
Re: CSS Element not working???
The path you use in a CSS file is relative to the file's location; I'd guess that your Images directory is not within your Styles directory. If Images and Styles are in the same place, then your path needs to be '../Images/DSC_0003.jpg'
-
Mar 5th, 2012, 11:47 PM
#3
Thread Starter
PowerPoster
Re: CSS Element not working???
That worked Sam...thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|