<li> <img/> <div class="desc"> <span class="desc_img">Lorem Lorem Lorem Lorem Lorem </span> </div> </li> .desc_services { display: block; margin-top: -20px; width: 100%; height: 60px;} .desc_img{line-height: 20px; text-align:left;text-transform:uppercase;overflow:hidden;padding:2px 0;} 

Now there is such an indent:

alt text

Is it possible to indent the sides? If done in a span, then the indent goes from the first and last word. And it is necessary that before the second and third lines indent 3 pixels :)

    1 answer 1

    Either in desc_services set padding , or turn desc_img into a block element ( display: block/inline-block; ).

    Depends on other requirements - there are a lot of solution options :)

    • In desc_services will not go he otsup and desc_img will shift. you need the background to be black left and right. And if you make desc_img a block, then it will be a black square, and you only need a black background in the text - Hancock888