WordPress.org

Ready to get started?Download WordPress

Forums

bg-image showing in header but not content (6 posts)

  1. shmish
    Member
    Posted 7 years ago #

    I am trying to add a background image to my content. For a test, I added code to both the header and content. The image is only showing in the header.

    The css looks like:
    #header {
    background: url('images/test.jpg') center center no-repeat;
    height: 40px;
    font-size: x-small;
    font-weight: bold;
    padding-top: 4px;
    padding-left: 3px;
    padding-right: 3px;
    padding-bottom: 0px;
    background-color: #444;
    margin: 0px;
    margin-bottom: 0px;
    border-bottom: solid 1px #000;
    }

    #content {
    background-color: #666;
    background: url('images/test.jpg') center center no-repeat;
    margin-left: 0;
    margin-right: auto;
    margin-bottom: 10px;
    padding-top: 0px;
    padding-bottom: 0px;
    width: 1000px;
    text-align: left;

    The header.php file has:
    <body>
    <?php include 'navigation-function.php';?>
    <?php include 'comment-popup-function.php';?>
    <div id="header">
    <div class="alignleft">
    <ul class="menu">

  2. <h5>Alpine<span>Visions</span></h5>
  3. </div>

    </div>

    <div id="content">

    Right-clicking on the content area and picking "view background image" shows that the image (a pink box) is there. However, it's as if the grey background is on top of this image.

    http://www.alpinevisions.dryfly.ca

    Any ideas why?

    thanks

  • vkaryl
    Member
    Posted 7 years ago #

    Try taking out the #666, or use "transparent" instead; see if that makes the graphic show up.

  • shmish
    Member
    Posted 7 years ago #

    I tried both of these suggestions without luck.

    s.

  • yosemite
    Member
    Posted 7 years ago #

    What I find disturbing is that it apparently works in IE.

  • shmish
    Member
    Posted 7 years ago #

    Yosemite, it looks like you are correct.
    It does not work in firefox or opera. Strange, I don't these template theme is very intricate.

  • shmish
    Member
    Posted 7 years ago #

    It looks like any div or class that follows the #content overwrites the background image. I'm placing the background image in .secondary and it's showing okay.

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags