jp612 Posted December 11, 2010 Report Share Posted December 11, 2010 Hi, One of my divs isnt working. I cant see it using firebug and its not listening to what the css file is saying. I have tried ie, firefox and chrome. however its just one div (content-wrapper). If I look at it in firebug menu its greyed out unless i say float: none in css. But even then it doesnt do any thing. this is my 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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <link href="css/style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="page-wrapper"> <div id="header"> <div id="navbar"> </div> </div> <div id="content-wrapper"> </div> </div> </body> </html> and this is my style sheet: #header { width: 1024px; height: 174px; margin-left: auto; margin-right: auto; background-image: url(../images/header.gif); background-repeat: no-repeat; } #navbar { width: 868px; height: 40px; background-image: url(../images/navbar.gif); background-repeat: no-repeat; position: relative; top: 126px; bottom: 0px; margin-left: auto; margin-right: auto; } #page-wrapper { height: 900px; background-image: url(../images/background-color.gif); background-repeat: repeat-x; padding: 0px 0px 0px 0px; } #content-wrapper { float: none; width: 868; height: 680; margin-left: auto; margin-right: auto; background-color: #C96; background-repeat: no-repeat; } all the other divs work its just the content-wrapper which doesnt appear or do anything. Does anybody know whats going on here? Thanks a million. Quote Link to comment Share on other sites More sharing options...
wjohn Posted December 11, 2010 Report Share Posted December 11, 2010 Well looking at your other divs, you seem to have forgot to add "px" after width and height #content-wrapper { float: none; width: 868px; height: 680px; margin-left: auto; margin-right: auto; background-color: #C96; background-repeat: no-repeat; } Quote Link to comment Share on other sites More sharing options...
Andrea Posted December 11, 2010 Report Share Posted December 11, 2010 Add a unit of measure to your #content-wrapper CSS and see what happens. Also, when something isn't floated, then it's not floated, so you don't need 'float: none;" Quote Link to comment Share on other sites More sharing options...
jp612 Posted December 11, 2010 Author Report Share Posted December 11, 2010 oh god, that really was it. I forgot to add px on the end of my dimensions. Damn late night coding! Thanks a lot for your help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.