WordPress.org

Forums

CSS problem: Background image will not display (3 posts)

  1. dlittle800
    Member
    Posted 5 years ago #

    Stuck trying to build a wordpress (2.9.1)theme (with Starkers theme) from local host.

    For some reason, the background image will not display.

    The image is in a folder in the index folder. It shows in my browser (localhost/wordpress/images/head_bg.png

    WordPress shows in the browser too, but I can't the image to show.

    Can you see anything in this CSS that looks suspicious?

    /*
    RESET
    */

    * { margin: 0; padding: 0; }
    html { overflow-y: scroll; }
    html, body { height: 100%; }
    body { font-size: 62.5%; font-family: Arial, sans-serif; color: #272727; background: url('images/header_bg.png') top center repeat-x white; }
    ul { list-style: square inside; }
    ol { list-style: decimal inside; }
    a { outline: none; text-decoration: none; }
    a img { border: none; }
    img { vertical_align: middle; }
    table { border_collapse: collapse; }

    /*
    UTILITY
    */

    .floatLeft { float: left; }
    .floatRight { float: right; }
    .clear { clear: both; }
    .button { border: 1px solid #272727; background: white; padding: 3px 8px; -moz-border-radius: 5px; -webkit-border-radius: 5px; color: #272727; }
    .button-hover { backgound: #990000; color: white; }

    /*
    STRUCTURE
    */

    #page-wrap { width: 960px; margin: 0px auto -250px; min-height: 100%; height: auto !important; height: 100%; }
    #push { height: 250px; }

  2. with the css, the code would expect the image to be in:
    localhost/wordpress/wp-content/themes/starker/images/head_bg.png
    (if starker is the name of the theme, you get the idea)

  3. Look at this part:

    body { font-size: 62.5%; font-family: Arial, sans-serif; color: #272727; background: url('images/header_bg.png') top center repeat-x white; }

    Try it as this:

    body { font-size: 62.5%; font-family: Arial, sans-serif; color: #272727;}
    background: {url('images/header_bg.png') top center repeat-x white; }

Topic Closed

This topic has been closed to new replies.

About this Topic