Results 1 to 2 of 2

Thread: CSS won't display background image

  1. #1
    Join Date
    Dec 2010
    Posts
    2

    CSS won't display background image

    hello,
    how yall doing?

    I'm facing a sticky problem

    I'm trying to recreate apple's navigate menu

    this is the html code

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title> this is apple menu bar! </title>
    <link rel="stylesheet" href="style.css" type="text/css" />
    </head>
    <body>
    <div id="navicontainer">
    <ul id="navi">
    <li id="Apple"><a href="#"><span>Apple</span></a></li>
    <li id="Store"><a href="#"><span>Store</span></a></li>
    <li id="Mac"><a href="#"><span>Mac</span></a></li>
    <li id="Ipod+Itunes"><a href="#"><span>Ipod+Itunes</span></a></li>
    <li id="iPhone"><a href="#"><span>iPhone</span></a></li>
    <li id="Downloads"><a href="#"><span>Downloads</span></a></li>
    <li id="support"><a href="#"><span>Support</span></a></li>
    </ul>
    </div>
    </body>
    </html>


    and this is the CSS code
    body {
    padding:0px;
    margin:0px;
    }

    #navicontainer {
    width:876px;
    height:39px;
    margin:0 auto;
    }
    #navi {
    width:876px;
    height:39px;
    margin:0 auto;
    list-style:none;
    }
    #navi li {
    display:inline;
    }
    #navi li a {
    float:left;
    height:39px;
    text-indent:-9999px;
    }
    #Apple {
    width:111px;
    background: url('../images/navii.jpg') no-repeat 0px 0px;
    }





    but the first button won't show in firefox neither IE!!

    any ideas?

  2. #2
    Blindguard Guest
    Change the
    #Apple {
    width:111px;
    background: url('../images/navii.jpg') no-repeat 0px 0px;
    }
    To background: url('../images/navii.jpg') no-repeat 0px 0px; in the Body, that is:
    body {
    background: url('../images/navii.jpg') no-repeat 0px 0px;
    }
    That should work.

Similar Threads

  1. CSS won't allow my Javascript to display
    By abaker in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 21 May 2009, 08:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •