/    Sign up×
Community /Pin to ProfileBookmark

height 100% problems

Hey all, I’m just trying to get the div here to be the height of the table cell that contains it. Works alright in Firefox, but no luck in IE.

[code]
<!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” lang=”en” xml:lang=”en”>
<html>
<body>
<table border=”1″ cellspacing=”0″ cellpadding=”0″ style=”height: 100%;”>
<tr>
<td>
hi<br /><br /><br /><br /><br />
</td>
<td style=”height: 100%;”>
<div style=”border: 1px solid green; height: 100%;”>
hey
</div>
</td>
</tr>
</table>
</body>
</html>
[/code]

…suggestions? workarounds? ?

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelApr 12.2006 — overstated, but why would you want to put a DIV inside a TD?

Get rid of the TABLE format and do this all with DIVs. A DIV inside a TD is a pointless convention, -a waste of material.

Wouldn't you prefer to have a non-table alternative that not only is smaller (ultimately, as this snippette of code you have here is basically a bare-bones layout still), and using DIV will open up many possibilities for styling it.
Copy linkTweet thisAlerts:
@TiGGiApr 12.2006 — add this to your css
[code=php]html,body {
height: 100%;
}[/code]
Copy linkTweet thisAlerts:
@ray326Apr 12.2006 — ...suggestions? workarounds? [/QUOTE]Ditch the table and do it right.
×

Success!

Help @schizo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...