html5 - how to add box shadow to after and before pseudo elements? -


i trying chat box....i want same color , box shadow pseudo elements similar concern box ..i tried not working ....

here codepen link http://codepen.io/mgkrish/pen/qmepep?editors=1100

.chat_other{  padding: 30px;            padding-bottom: 15px;      padding-top: 15px;  display: flex;     background-color: #ffffff;         box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.1),inset 0px 1px 0px 0px rgba(255, 255, 255, 0.15);     border-radius: 14px;     width: 50%;     position: relative;     margin-left:30px;  }      .chat_other:before {             content: "";      position: absolute;      z-index: -1;      bottom: -2px;      left: -23px;      height: 20px;      border-left: 40px solid #e5e5ea;      border-bottom-right-radius: 16px 14px;      border-bottom-left-radius: 9px;      -webkit-transform: translate(0, -2px);      }      .chat_other:after {         content: "";      position: absolute;      z-index: -1;      bottom: 0px;      left: 4px;      width: 26px;      height: 20px;      background: white;      border-bottom-right-radius: 24px;      border-bottom-left-radius: 3px;      -webkit-transform: translate(-30px, -2px);           /* border: 1px solid red; */}  .chat_self{      background-color: #e6f7fd;        border-radius: 14px;        padding:30px;           padding-top: 0;             box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.1),inset 0px 1px 0px 0px rgba(255, 255, 255, 0.15);             width: 50%;                  margin-right: 28px;                 padding-bottom: 15px;                 position: relative;  }  .chat_self:before {    content: "";      position: absolute;      z-index: -1;      bottom: -2px;      right: -26px;      height: 20px;      border-right: 56px solid #e6f7fd;      border-bottom-left-radius: 15px 19px;      -webkit-transform: translate(0, -2px);      border-bottom-right-radius: 43px;    }  .chat_self:after {    content: "";      position: absolute;      z-index: -1;        bottom: 4px;      right: -59px;      width: 29px;      height: 20px;      background: white;      border-bottom-left-radius: 16px;      border-bottom-right-radius: 9px;      -webkit-transform: translate(-30px, -2px);    }
 <div class="chat_other">                     	                     	<p>hey guys! hope doing great. who’s run today? excited fact of can join me this.</p>                     	<p class="msg_time">12.47</p>                     </div>                         </div>                       <div class="self">	                                              <div class="chat_self">                     	                     	<p>hey guys! hope doing great. who’s run today? excited fact of can join me this.</p>                     	 	<p class="msg_time">12.47 </p>                     </div>                         </div>


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -