Jump to content
  • 0

Таблица высотой 100%


renton
 Share

Question

Друзья, привет еще раз!

Код значит:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div style="width: 100%; height: 100%; position: absolute; left: 0; top: 0;">
<table border="1" cellspacing="5" cellpadding=0 bgcolor="#DFE8F6" width="100%" style="height: 100%; table-layout: fixed; min-height:100%; border-collapse:collapse">
<tr>
<td colspan="2" valign="top" align="center" height="50">HHH</td>
</tr>
<tr>
<td valign="top" align="center">LLL</td>
<td valign="top" align="center">
<table border="3" width="100%">
<tr>
<td>MMM</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" valign="top" align="center" height="50">FFF</td>
</tr>
</table>
</div>
</body>
</html>

Можно ли как-то таблицу MMM растянуть по вертикали на 100%? Спасибо!

Ох, сам уже дошел. style="height: 100%;" у таблицы MMM и у "родителя".

Edited by renton
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Ан, нет. Поспешил я.

<td valign="top" align="center" style="height: 100%;">
<table border="3" width="100%" style="height: 100%;">
<tr>
<td>MMM</td>
</tr>
</table>
</td>

да, растянуло. Но так что включилась полоса прокрутки. Т.е. я так понял ее раснянуло не на высоту <td> в которой таблица, а вообще на высоту body.

Link to comment
Share on other sites

  • 0
Ан, нет. Поспешил я.

<td valign="top" align="center" style="height: 100%;">
<table border="3" width="100%" style="height: 100%;">
<tr>
<td>MMM</td>
</tr>
</table>
</td>

да, растянуло. Но так что включилась полоса прокрутки. Т.е. я так понял ее раснянуло не на высоту <td> в которой таблица, а вообще на высоту body.

Да

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  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.

 Share

×
×
  • 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. See more about our Guidelines and Privacy Policy