WordPress.org

Support

Support » How-To and Troubleshooting » CSS problem: Background image will not display

CSS problem: Background image will not display

  • dlittle800
    Member

    @dlittle800

    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; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • Michael
    Forum Moderator

    @alchymyth

    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)

    Edward Caissie
    Theme Review Admin, The JellyBeen Man

    @cais

    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; }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS problem: Background image will not display’ is closed to new replies.