Jump to content

Div Won't Resize


Dysan

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.