Jump to content
  • 0

Текст выходи за пределы блока


Pato
 Share

Question

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

image.png

вот такой код

<div class="sidebar" id="sideLeft">
<div class="blk">
<div class="zagolovok"><h3>Навигация</h3></div>
<div class="link"><a href="">Категория</a></div>
<div class="link"><a href="">Категория</a></div>
<div class="link"><a href="">Категория</a></div>
<div class="link"><a href="">КатегорияКатегорияКатегориярияКатегория</a></div>
</div>
</div

.blk {padding:0 0 10px 0;background: #1a1a1a;}
.zagolovok {background: url(../images/zag.png) no-repeat;height:40px;margin:0 0 8px 0;}
.blk h3 {font-family:Myriad Pro Cond; font-weight: bold; text-transform: uppercase; font-size:17px; padding:12px 0 0 15px; color:#000; text-shadow: black 0px 1px 0px, inherit 1px 0 0; }
.link {background: url(../images/li_top.png) no-repeat 10px 8px; padding:5px 0 0px 30px; border-bottom:1px dotted #0f0f0f; }
.link a {color:#fff; font-family: Arial; text-decoration: none;}
.link a:hover {text-decoration: underline;}

Edited by Pato
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

метоксихлордиэтиламинометилбутиламиноакридин :rofl:

ЗЫ есть такое не валидное и не входящее в стандарты свойство word-wrap


.text {
word-wrap:break-word;
}

и CSS3 свойство word-break


.text {
word-break: break-all;
}

перенос слова если оно не вмещается в ширину блока.

Edited by wwt
  • Like 1
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