<div class="grid__item grid__item--featured-collections small--one-half medium-up--one-fifth"> <div class="grid-view-item"> <a class="grid-view-item__link" href="/'.$row[" type_tovara "].'/'.$row["products_id "].'-'.ftranslite($row["title "]).'/"> <div class="small--hide" style="margin-left: -35px;">'.$row["top_sales"].'</div> <div class="site-header__menu" style="margin-top: 22px; margin-left: -35px;">'.$row["top_sales"].'</div> <div class="small--hide" style="margin-left: -35px;">'.$row["under_order"].'</div> <div class="small--hide" style="margin-left: -35px;">'.$row["novelty"].'</div> <img class="grid-view-item__image" src="'.$img_path.'"> <div class="h4 grid-view-item__title">'.$row["title"].'</div> <div class="grid-view-item__meta"> <span class="visually-hidden">Regular price</span> <span class="product-price__price">'.group_numerals($row["price"]).' грн</span> </div> </a> </div> </div> 

It is displayed like this, it is clear that the word "New" is on top of another label.

enter image description here

It is necessary that subsequent labels if there is something to be from a new line, how not tried to do, it does not work, always move the labels along with the photo of the jacket ...

Label Styles Attach:

 .plus1{border:1px solid #0095EB;background-color:rgba(255, 255, 255, 0.8);color:#0095EB; z-index:3;border-radius:3px;padding:0px 4px 2px 4px;position:absolute;margin-left:35px;margin-top:-25px;font-size:12px;float:left;} .plus2{border:1px solid #0095EB;background-color:rgba(255, 255, 255, 0.8);color:#0095EB; z-index:3;border-radius:3px;padding:0px 4px 2px 4px;position:absolute;margin-left:35px;margin-top:-25px;font-size:12px;float:left;} .plus3{border:1px solid #0095EB;background-color:rgba(255, 255, 255, 0.8);color:#0095EB; z-index:3;border-radius:3px;padding:0px 4px 2px 4px;position:absolute;margin-left:35px;margin-top:-25px;font-size:12px;float:left;} 

Labels themselves:

 <div class="plus2">Под заказ</div> <div class="plus3">Новинка</div> <div class="plus4">Топ</div> 

An example of how it should be: enter image description here

    1 answer 1

    Set the desired element such styles

     .item { display: block; } 
    • did not quite understand how to implement ... - No Name
    • specify the display: block property for the element to be moved to the next line - Ilya Shishlachev
    • they say like this? <div class = "small - hide" style = "margin-left: -35px;"> '. $ row ["top_sales"].' </ div> <div class = "small - hide" style = " margin-left: -35px; display: block; "> '. $ row [" under_order "].' </ div> - does not work - No Name