html - Up triangle, adjusting the y position in CSS -


hey have triangle in css created so:

.triangleup {    width: 0;    height: 0;    border-style: solid;    border-width: 0 7.5px 10px 7.5px;    border-color: transparent transparent #58be23 transparent;    display: inline-block;  }
<h1>here triangle<i class="triangleup"></i></h1>

i change y position of triangle , move top of triangle aligns top of text. how go doing this?

try this:

.triangleup {   vertical-align: top;<----------added   //more code......... } 

.triangleup {    width: 0;    height: 0;    border-style: solid;    border-width: 0 7.5px 10px 7.5px;    border-color: transparent transparent #58be23 transparent;    display: inline-block;    vertical-align: top;  }
<h1>here triangle<i class="triangleup"></i></h1> 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -