puppeteer701
puppeteer701

Reputation: 1285

Styling span into multiple lines

this is my html:

<div class="Item-Text>
     does not contain: <span class="Item-Props">fdsf sdfds f</span>
     , <span class="Item-Props">is</span>
     , <span class="Item-Props">is not</span>
     , <span class="Item-Props">contains</span>
     , <span class="Item-Props">does not contain</span>
     , <span class="Item-Props">Entry</span> 
</div>

example: http://jsfiddle.net/mato75/Labor4az/3/

but I would like it that it would have some max width and it will be presented in multiple lines.

Upvotes: 0

Views: 69

Answers (3)

Husen
Husen

Reputation: 935

FIDDLE

.Item-Text { max-width:150px; }

Upvotes: 1

Gemini
Gemini

Reputation: 89

Replace your class with Item-Props

.Item-Props {
    color: red;display:block;
}

Upvotes: 1

Dwza
Dwza

Reputation: 6565

use <ul> for this

<div class="Item-Text">does not contain:
    <ul style="list-style-type:none;">
        <li class="Item-Props">fdsf sdfds f,</li>
        <li class="Item-Props">is,</li>
        <li class="Item-Props">is not,</li>
        <li class="Item-Props">contains,</li>
        <li class="Item-Props">does not contain,</li>
        <li class="Item-Props">Entry,</li>
    </ul>
</div>

Upvotes: 0

Related Questions