PDA

View Full Version : 100% Height?


Fainaru
12-30-2005, 12:45 AM
Okay so I'm having some CSS problems here.


.content

{
font-size: 8pt;
line-height: 10pt;
font-family: verdana, sans-serif;
width: 485px;
height: 100%;
position: absolute;
left: 5px;
top: 410px;
border: 1px solid #000000;
}

I usually do that and the CSS works fine, but for some reason, I have to change height: 100% into height:100%px for the height to stretch with the content. What could be the problem/error in my CSS?

Krazim
12-30-2005, 07:35 AM
Hmm..maybe just remove the height, I guess....

SN
12-30-2005, 07:37 AM
The line-height... that's what I'm guessing, considering it has been an issue with me before.

DOMOSTICK
12-30-2005, 06:34 PM
Possibly because your width is in pixels and your height is in percent, sometimes CSS doesn't like them to be switched right in the middle of an element.

SN
12-31-2005, 05:25 AM
Oh yeah... how did I not see that? Ha.

Krazim
12-31-2005, 02:50 PM
XD Domo's really observant. Yeah, that's what I guess, Fainaru.

Fainaru
12-31-2005, 04:35 PM
arghh. yay. it works now! *thumbs up* remind me next time to remove my height if it screws up! ^^

Krazim
12-31-2005, 04:56 PM
OKie dokie, Fainaru *puts in Notepad: Remind Fainaru*

Fainaru
12-31-2005, 05:07 PM
hehehe *puts in Notepad: Krazim rocks!*