css - I can't allign my div to the bottom of its parent -


i have div don't know how allign bottom of parent.

i tried bottom: 0 , margin-bottom: 0 both doesn't work. played position aswell , doesn't change absolute position makes div stick bottom of page. vertical-align doesn't seem work aswell.

here's simplified version of code:

.category{          height: 70px !important;          width: 28% !important;          margin: 0 10px 0 10px;          border: 1px solid #3a94d7;          border-radius: 15px;          box-shadow: 0 0 15px 1px rgba(0,0,0,.75), inset 0 0 2px 0 #4293d5;      }      .icon-steam{          background: url(../img/steam.png) 50% 50% no-repeat;      	background-size: 40px;          float: left;          width: 40px;          height: 40px;          margin-right: 0.3em;      }      .platform{      	text-shadow: none;      	color: #65a1bf;      	text-align: center;        bottom: 0;        position: relative;        margin-bottom: 0;      }
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>  <div class="categories">  			<div class="category icon-steam"><div class="platform">steam</div></div>  		</div>

and there's fiddle link if want: https://jsfiddle.net/kk8lwh6v/

can me please?

add position:absolute on element want align , add position:relative on parent.

.category {    height: 70px !important;    width: 28% !important;    margin: 0 10px 0 10px;    border: 1px solid #3a94d7;    border-radius: 15px;    box-shadow: 0 0 15px 1px rgba(0, 0, 0, .75), inset 0 0 2px 0 #4293d5;    position: relative;  }    .icon-steam {    background: url(../img/steam.png) 50% 50% no-repeat;    background-size: 40px;    float: left;    width: 40px;    height: 40px;    margin-right: 0.3em;  }    .platform {    width: 100%;    text-shadow: none;    color: #65a1bf;    text-align: center;    bottom: 0;    position: absolute;    margin-bottom: 0;  }
<div class="categories">    <div class="category icon-steam">      <div class="platform">steam</div>    </div>  </div>


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 -