Results 1 to 3 of 3

Thread: [RESOLVED] CSS Element not working???

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Resolved [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:
    <&#37;@ 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,
    Blake

  2. #2
    Frenzied Member
    Join Date
    Apr 2009
    Location
    CA, USA
    Posts
    1,516

    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'

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: CSS Element not working???

    That worked Sam...thanks!
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width