WordPress.org

Ready to get started?Download WordPress

Forums

Background image not showing up(!) (13 posts)

  1. saint
    Member
    Posted 9 years ago #

    Hi, I'm new... I did searches and didn't find an answer, maybe you can help me?

    I am using a template that was made for 1.2, I got it to work with 1.5 except that the image doesn't show up at all.

    I have it linked like this,

    body {
    background-attachment: fixed;
    background-color: #fff;
    background-image: url(/images/saintlogo.jpg);
    background-position: top right;
    background-repeat: no-repeat;
    }

    ... and the image is in it's proper location. I've tried everything... please help?

    Thanks!

  2. Joshua Sigar
    Member
    Posted 9 years ago #

    for the url you might want to try
    images/saintlogo.jpg

    just a quick guess :)

  3. Jinsan
    Member
    Posted 9 years ago #

    also try adding quotes to it:

    url('images/saintlogo.jpg');

  4. sarcenet
    Member
    Posted 9 years ago #

    I was under the impression that urls should also be in quotation marks...
    http://www.w3.org/TR/CSS21/colors.html#background-properties

  5. saint
    Member
    Posted 9 years ago #

    Thanks alphaoide... it came with the slash in front and I tried without, doesn't seem to make any difference. wouldn't be surprised if it was something simple like that though..

  6. saint
    Member
    Posted 9 years ago #

    Hmm.

    Quotes = no difference

  7. Joshua Sigar
    Member
    Posted 9 years ago #

    well, do you know exactly where the image is relative to the css file?

  8. saint
    Member
    Posted 9 years ago #

    It's in the same folder as the css file, in another folder called 'images'. I tried putting it in the same folder and bypassing the images folder but... yep, same thing.

    This problem has stumped me for a while, I tried a lot of google searches etc. I've read tutorials on css but I'm not very experienced yet.

    about time for bed here in my part of the world... thanks for the help everyone :)

  9. Minna
    Member
    Posted 9 years ago #

    Could you give us a link to the site? It would be very very helpful. Or do you want to keep it a secret? :) I understand that, too

  10. HugoA
    Member
    Posted 9 years ago #

    The shorthand property 'background' is considered better supported than using the individual properties such as 'background-image' , 'background-attachment' etc.

    Try using:

    background: url(images/saintlogo.jpg) fixed no-repeat right top #fff;

    Quotes around the url aren't needed and can cause problems with IEMac, the leading slash also should not be needed if the folder is in the same one as the stylesheet, be careful to ensure spaces after the url closing brace, position is quoted horizontal then vertical.

    This may help, but also has the benefit of reducing file size.

    Hugo.

  11. saint
    Member
    Posted 9 years ago #

    Well, the maker of the template is helping me out now :) Maybe we'll figure it out now.
    Trying the different link to the url didn't seem to work either.

    The url is saintcompany.com, I didn't post it yesterday 'cause I just bought it and it wasnt' leading to my site yet. If you go to it you'll see it's directed at the parent directory... not sure how to get it straight to wordpress yet. Moving the wordpress folder just made it not work at all.
    -Avy

  12. Minna
    Member
    Posted 9 years ago #

    One problem could be that you have document type declarations, head tags and body tags twice (and slightly different) for some reason. But it's good that you have the theme author to consult

  13. Try validating the page first. I got errors with the doctype, html & head tags, so it might just be horking the rest on principle.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.