Make text outside div invisible

Viewed 3661

I have got problem with word wrapping in div. I am trying to make something like that: Link, but i have got this: Link. This is my code:

#div-1 {
  height: 28px;
  width: 250px;
  margin-top: 5px;
  border: 1px solid rgb(200,200,200);
}
#span-1 {
  font-size: 18px;
  color: #0066FF;
  line-height: 28px;
  position: absolute;
}
<div id="div-1">
    <span id="span-1"> SomeTextSomeTextSomeTextSomeTextSomeText </span>
</div>

Can you help me? Thanks.

6 Answers

Add this: word-wrap: break-word;

Related