Support » Themes and Templates » Theme css not finding images

  • Hi all,

    i really can’t get out of this problem.

    if i try this on my style.css:

    .background {
    background-image: url ('images/background.jpg');

    it won’t load the image. this my folder hierarchy:


    i’ve tried every path possible, ../ ‘ing till my root folder, but nothing.

    in the html markup i know i should write

    <img src="<?php bloginfo('template_directory')/images/background.jpg" />

    and it works, but i cannot put php code in my css of course.
    i tried to give a look to the default kubrick .css file, and i’ve noticed it just normally like this

    .background {

    my folder hiersrchy is exactly the same, and the permissions seem to be tha same too.

    anyone knows what i’m doing wrong? i’m loosing my day googling without finding a solution.

Viewing 3 replies - 1 through 3 (of 3 total)
  • gonna sound silly but try and remove the space between url and the (.

    .background {
    background-image: url('images/background.jpg');


    Do you have in your stylesheet this:
    url ('images/background.jpg')

    Rather than this?:

    If you have the space after “url” it won’t display the background image.

    Good luck!

    Well i think i have tried that too, i have rewrite it several time in different ways so i don’t think it’s that.

    anyway, i managed to get put of this problem (not to solve it). i created a new theme folder, created brand new empty files and copied the codes (exactly the way they were) to the new files… and it works.

    the code is the same, the folders are the same, the files too… uh?

    really don’t know what happened to theat folder.. but i’m able to go on with my work now.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Theme css not finding images’ is closed to new replies.