Jump to content
  • 0

Скрол в ячейке таблицы при высоте 100% экрана


SCHNITZER
 Share

Question

В левую ячейку необходимо добавить полосу прокрутки, при том, что высота таблицы будет 100% от экрана. (параметр position: fixed мне необходим).

<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" lang="ru" xml:lang="ru">
<head>
<title> Тестовая страница </title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<meta http-equiv="Content-Style-Type" content="text/css"/> <!Язык таблиц стилей CSS>
<meta name="Resource-Type" content="Document" />

<style type="text/css">

BODY
{ margin: 0;
padding: 0;
height: 100%;
width: 100%;
background: #796f80;
}

</style>

</head>

<body>

<table height='100' width='850' border='0' cellspacing='0' cellpadding='0' frame='void' rules='none' style='background: #b8b7bb; position: fixed;'>
<col width='250'>
<col width='600'>
<tr align='center'>
<td>
<div style='height: 100%; width: 250px; overflow: auto;'> <img src='http://i706.photobucket.com/albums/ww68/szr4/im.jpg' height='1200' width='220'.</div>
</td>
<td>Second cell</td>
</tr>
</table>

</body>

</html>

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

  • 0
Так пытался, не получается... Или можно пример тогда написать, может что не так делаю. Нет полосы прокрутки.

Я не наблюдаю в твоём коде, что ты задал высоту 100% всем родительским элементам

Link to comment
Share on other sites

  • 0
Я там ошибся, написал "<table height='100' width='850'", 100%, конечно же.

А вот в чем проблема то. Этот код не работает в Mozilla и Netscape, во всех остальных нормально. Давайте разберемся почему.

Так, чтобы нам разобраться, для начала давай вместе прочитаем всё, что находится по этой ссылке http://stepbystep.htmlbook.ru/

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