Jump to content
  • 0

проблемы с границами


VampaOdinn
 Share

Question

несмотря на то, что границы блока заданы жестко, текст вылезает за его пределы (ну, или появляются полосы прокрутки при добавлении owerflow: auto")

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<div id="scroll"></div>

CSS

#scroll {
position: relative;
width: 270px;
height: 150px;
overflow: auto
}
.item {
margin-bottom: 6px
}
.name {
cursor: hand
}

JavaScript

  var oScroll=document.getElementById("scroll");
htmlMessage+="<div class='item' style='color:"+color+";'>";
htmlMessage+="<div class='name' onclick='priv(""+name+"")'><b>"+name+"</b>: </div>";
htmlMessage+=message.toString();
htmlMessage+="</div>";
oScroll.innerHTML+=message;

уже и в item добавлял ширину в пикселах, все равно не помогает... как сдалать, чтобы текст нормально переностся на следущую строку

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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