Theme css not finding images (4 posts)

  1. derMainz
    Posted 6 years ago #

    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.

  2. blogbreaking
    Posted 6 years ago #

    gonna sound silly but try and remove the space between url and the (.

    .background {
    background-image: url('images/background.jpg');
  3. 11worth
    Posted 6 years ago #


    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!

  4. derMainz
    Posted 6 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic