1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS Background image for H1 tags

Discussion in 'CSS' started by djingel, Jul 15, 2008.

  1. #1
    Hi,

    Since today I've started with css (better late than never uh :)) and I have a small problem.

    I've set the <h1> style tag like this in css:

    h1 {
    margin: 0;
    color: #7a7a7a;
    font-size:18px;
    margin-top: 7px;
    margin-bottom: 10px;
    font-weight:normal;
    background-image: url(/images/h1back.gif);
    font-family: Georgia, "Times New Roman", Times, serif;
    background-repeat:no-repeat;

    Now, this works perfectly on subdirectory pages like /subdir/index.html but on the front page (index.html) the background image is not working (the rest of the style like collor and font are correct).

    Anyone has an idea how this is possible?
     
    djingel, Jul 15, 2008 IP
  2. yankzilla

    yankzilla Peon

    Messages:
    159
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try changing it to: background-image: url('http://yourdomains.com/images/h1back.gif'); to make it a direct link to the file itself, instead of a reference. It's ugly, but it will work.
     
    yankzilla, Jul 15, 2008 IP
  3. djingel

    djingel Active Member

    Messages:
    310
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    66
    #3
    Hi,

    I've tried that, but it still doesn't work. I even tried to remove all other css but it just doesn't seem to work on the first page while all other pages are not having any problem.
     
    djingel, Jul 15, 2008 IP
  4. yankzilla

    yankzilla Peon

    Messages:
    159
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Can you send the url to me so I can check it out.
     
    yankzilla, Jul 15, 2008 IP