Dysan Posted March 4, 2008 Share Posted March 4, 2008 Why doesn't the height of the "word" div change upon entering a different percentage value? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <div id="container"> <form id="form1" method="post" action=""> <div id="word"> djklskljdlkjlkjs </div> </form> </div> </body> </html> body { MARGIN: 0px; PADDING: 0px; BACKGROUND: black; /* Delete Me! */ } #container { WIDTH: 759px; HEIGHT: 850px; MARGIN: 0px auto; PADDING: 0px 6px 0px 6px; BACKGROUND: url(bg.bmp) no-repeat; } #word { TOP: 230px; WIDTH: 380px; HEIGHT: 70%; FONT-SIZE: 70%; BACKGROUND: red; FONT-WEIGHT: bold; POSITION: relative; FONT-FAMILY: Tahoma; PADDING: 34px 45px 36px 30px; /* TRBL */ } Link to comment https://forums.phpfreaks.com/topic/94369-div-wont-resize/ Share on other sites More sharing options...
phpknight Posted March 5, 2008 Share Posted March 5, 2008 Can you give a link to the page so I can see this? Also, try min-height: 400px; for the word box and see if that fixes it. That might give me a clue as to the issue. Link to comment https://forums.phpfreaks.com/topic/94369-div-wont-resize/#findComment-483508 Share on other sites More sharing options...
Dysan Posted March 5, 2008 Author Share Posted March 5, 2008 The HTML and CSS for the page was included in my previous post. Link to comment https://forums.phpfreaks.com/topic/94369-div-wont-resize/#findComment-484088 Share on other sites More sharing options...
haku Posted March 6, 2008 Share Posted March 6, 2008 Links are always easier to work with than code, because we can play around with the code live and figure out the problem. You are more likely to get help if you post al ink. That being said, I have seen this before, though never used it: 5:24 am on May 8, 2007 (utc 0) html {height: 100%;} body { background: #333; height:100%; /* this is the key! */ margin: 0 auto; width: 852px; } #container { height:100%; background: #999; } Maybe it can help. Link to comment https://forums.phpfreaks.com/topic/94369-div-wont-resize/#findComment-484506 Share on other sites More sharing options...
phpknight Posted March 6, 2008 Share Posted March 6, 2008 I agree there. It is always fastest and easier to debug with the link. Otherwise you have to make the page yourself, but sometimes you can spot it right away when you see it live. Thanks for that point. Link to comment https://forums.phpfreaks.com/topic/94369-div-wont-resize/#findComment-484656 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.