Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

CSS Help!!!

AdzAdz
edited October 2006 in Vanilla 1.0 Help
I'm not sure if it is appropriate to post this here but you guys seem to know what your talking about so i would like to ask for your help =[ I'm coding a website for my friend and attempting to do it in css for the first time and ive run into some problems. here is the html i have got so far: <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <link rel="stylesheet" href="Rsfakes.css"/> </head> <body> <div id="container"> <div id="banner"></div> <div id="navbar"> <div id="nav1"></div> <div id="home"><img src="Images/home.png" height="17" width="47" alt="Home" /></div> <div id="nav2"></div> </div> </div> </body> </html> and here is the css: body {background-image:url(Images/bg.png); background-repeat:repeat; margin-top: 20px;} #container {text-align:center; margin-left:auto; margin-right:auto;} #banner {background-image:url(Images/Banner.png); width: 904px; height: 102px; margin-right:auto; margin-left:auto;} #navbar {width: 904px; height: 17px; margin-left:auto; margin-right:auto;} #nav1 {width: 80px; height: 17px; background-image:url(Images/Nav1.gif); float:left;} #home {width: 47 px; height: 17px; float:left;} #nav2 {width: 134 px; height: 17px; background-image:url(Images/nav2.gif); float:left;} The div "nav2" doesn't want to show for some reason? Can anyone help me? Thanks in advance! Adz.

Comments

  • edited October 2006
    Try putting a &nbsp; in the middle of the nav2 div; Empty divs have an odd tendency to disappear.
  • Just tried that, it still wont show for some reason :(
  • dan39dan39 New
    edited October 2006
    Basically xhtml standards stipulate that empty divs do not exist (since there is nothing in them). I agree with Bergamot. I think you need to put some dummy text into your nav divs. Either that, or your image paths might be wrong if you're still not seeing background images.
  • Add border: 1px solid red; to all your div's in the css and you'll be able to see what they are all doing. Or you can change the colors to see which one is doing what...

    That may show you where that one div is ending up. Feel free to email me if you want some extra help. brian [dot] zollinhofer [at] gmail
  • TomTesterTomTester New
    edited October 2006
    My tip: install Firefox and its web developer toolbar, then use the outline menu to show you all DIVs
This discussion has been closed.