Why Isn't This Image Showing Up? I uploaded this image, but it won't show up when I add it to the

9 replies
  • WEB DESIGN
  • |
I uploaded this image (notice the URL of the image at the top), but it won't show up when I add it to the styles.css and refresh the page.

Here's a link to the website.

It shows up when I paste it in in Firebug.

What am I doing wrong?
#add #image #show #showing #uploaded
  • Profile picture of the author David V
    That's because the url you have in the stylesheet is relative.
    So typically a style.css may contain a path like:
    Code:
    url('images/mycoolimage.png')
    So the image path is relative to the CSS file location.

    The image you pointed out is uploaded into the WordPress uploads folder. It will never show unless you use the full path with the "http:"
    {{ DiscussionBoard.errors[8174446].message }}
  • Profile picture of the author mrniceguy123
    But why do the other images next to it in the CSS show up? Those are relative as well, meaning the whole path isn't in the CSS.

    I placed the file in the same directory as the other two that are showing up, so I thought it knew the path where the file resides that I'm trying to get to show up.

    EDIT: By the way, the image that I uploaded is in the Images folder, just like the other two, isn't it?

    Man, I may need to give this stuff a break for the evening, my brain is fried.
    {{ DiscussionBoard.errors[8174464].message }}
  • Profile picture of the author David V
    When I looked at the image you posted, it was in the uploads folder.
    Just double check where you put it. If it really is in the same folder as the others, then the name or extension is wrong.
    {{ DiscussionBoard.errors[8174473].message }}
  • Profile picture of the author mrniceguy123
    Here's a link to the image. Everything looks right to me. I checked and double checked.
    {{ DiscussionBoard.errors[8174484].message }}
  • Profile picture of the author David V
    Well, it does look right.
    Flush your browser cache, I'll see if I can get it to show for me.
    {{ DiscussionBoard.errors[8174496].message }}
    • Profile picture of the author mrniceguy123
      OK, I just cleared my browser cache.
      {{ DiscussionBoard.errors[8174505].message }}
  • Profile picture of the author David V
    I do see one little discrepency.
    Here is the url for your other images:
    HTML Code:
    http://myhousesforsaleindetroit.com/wp-content/themes/Wp/images/agmadesmaller3.png
    Here is your new image url you posted (notice the lowercase w)
    HTML Code:
    http://myhousesforsaleindetroit.com/wp-content/themes/wp/images/final_logo_please51.png
    Do you have 2 wp folders? - a Wp and a wp?

    EDIT: That's the issue. I can get it to work for me by changing that "w", so you have it in the wrong folder.
    {{ DiscussionBoard.errors[8174515].message }}
  • Profile picture of the author David V
    See for yourself, I changed just the "w" and it's fine.

    Code:
    .art-header {
    margin: 0px auto;
    height: 200px;
    background-image: url('images/agmadesmaller3.png'), url('http://myhousesforsaleindetroit.com/wp-content/themes/wp/images/final_logo_please51.png'), url('images/header.jpg');
    background-position: 848px 55px, 0px 33px, 0px -55px;
    background-repeat: no-repeat;
    position: relative;
    z-index: auto ! important;
    }
    Note: you might want to push it down a little away from the menu. See bold.

    background-position: 848px 55px, 0px 33px, 0px -55px;
    {{ DiscussionBoard.errors[8174535].message }}

Trending Topics