html - Cannot apply padding-bottom to inner span element -


.scss

div.playlist {         position: relative;         display: inline-block;     }     div.playlist span {         position: absolute;         text-align: center;         height: 100%;         width: 100%;         color: white;         font-size: 20px;         .span-icon {             padding-bottom: 50px !important;         }     }     div.playlist span:before {         display: inline-block;         vertical-align: middle;         height: 100%;         content: '';     } 

.html

<div class="playlist">   <span class="span-icon"><ion-icon name="ios-star-outline"></ion-icon></span>   <span>{{data.text}}</span>   <img [src]="data.imageurl" [alt]="data.text" /> </div> 

i need give padding-bottom: 50px first span element(i.e. class="span-icon").i have tried below.but not working.can tell me issue?

 div.playlist span {         position: absolute;         text-align: center;         height: 100%;         width: 100%;         color: white;         font-size: 20px;         .span-icon {             padding-bottom: 50px !important;         }     } 

rendered on browser:

<ion-col class="col" col-6="">         <playlist ng-reflect-data="[object object]"><div class="playlist">   <span class="span-icon"><ion-icon name="ios-star-outline" role="img" class="icon icon-md ion-ios-star-outline" aria-label="star outline" ng-reflect-name="ios-star-outline"></ion-icon></span>   <span>my favorites</span>   <img src="./assets/images/img2.jpg" alt="my favorites"> </div></playlist>       </ion-col> 

you specified scss incorrect. please use below. .span-icon not child of span, of .playlist

div.playlist {    span {      position: absolute;      text-align: center;      height: 100%;      width: 100%;      color: white;      font-size: 20px;    }    .span-icon {      padding-bottom: 50px !important;    }  }


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -