Jump to content
  • 0

Параметр overflow не работает


Vialls
 Share

Question

Всем привет.

Имеется страница, след. структуры

...
<table>
<tr>
<td>
....
</td>
<td>
<div class="content">
<div class="code">
....
</div>
</div>
</td>
</tr>
</table>
...

Часть CSS кода:

...
div.code
{
background-color: #F2F1ED;
border: 1px dashed #000000;
font-family: Courier;
margin: 10px;
overflow: scroll;
padding: 5px;
}
...

Как видите, у div'а с классом "code" параметр overflow установлен в scroll. Но, не работает. При вводе нескольких десятков символов (не пробельных), этот div уезжает за экран монитора, при этом scrollbar остается заблокированным... В чем может быть проблема? :)

Заранее спасибо.

Edited by Vialls
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Горизонталь.

1) Установить нужный width или height для div.code

Про этот вариант знаю, но он мне не подходит. Мне нужно, что бы div.code растягивался на всю ширину блока, в котором он лежит, а блок в котором он лежит, резиновый...

Есть еще варианты?

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