[Typo3-dev] Problems with XHTML and height:100%

Christopher tombedlam at yahoo.com
Tue Dec 16 18:46:22 CET 2003


Greetings Kasper,

--- "Kasper_Skårhøj" <kasper at typo3.com> wrote:
> Hi FOlks.
> 
> Using XHTML for the RTE Wizard (wizard_rte.php script, showing the
> RTE in full screen mode) means that the display of the RTE in a
> <div>/<Iframe> does not happen anymore. The reason apparently is that
> the instruction in the "style" attribute to the table about setting
> the height to 100% is not observed. On the other hand, using a pixel
> value works.
> 
> Currently I have been forced to set the height to 600px so its shown.
> If any of you can help me to get back the 100% height for the window,
> please do so. I have no clue myself. Seems to be a general problem of
> standards compliance in XHTML that you cannot successfully set the
> height to 100% for elements. Or?
> - kasper

The way 100% height works in css is slightly tricky; you can assign a
height of 100% to an element, but unless its parent element ALSO has a
height assigned, it **will not work**. This is because percentage
heights in css are percentages of the height **of the parent element**.

So, the trick is usually to make sure that the BODY tag has a height of
100%: body {height:100%;}. There's a nice explanation & example of this
on the webmasterworld forum:

http://www.webmasterworld.com/forum83/200.htm?highlight=css++100%

Hope it's useful.

-Christopher

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree





More information about the TYPO3-dev mailing list