html - How to control position of profile element in parent element? -
i write profile html , css. have problem when control element position , send front.
i have code this:
/* profile custom */ .service-container { background: url('http://images.indianexpress.com/2016/05/love-autumn-tree_759_thinkstockphotos-177812216.jpg'); height:500px; width: 400px; } .layer { background-color: rgba(0, 179, 0, 0.6); width: 100%; height: 100%; } figure.card-profile { font-family: roboto_regular; border-style: solid; border-width: 1px; border-color: rgb(255, 255, 255); position: relative; float: left; overflow: hidden; margin: 10px 1%; width: 100%; color: #333; text-align: left; } figure.card-profile img { max-width: 100%; vertical-align: middle; border-style: solid; border-width: 6px; border-color: rgb(255, 255, 255); height: 90px; width: 90px; border-radius: 50%; margin: 40px 0 0 10px; } figure.card-profile p { display: block; border-radius: 0px; position: relative; color: #fafafa; padding: 25px 50px 30px 50px; font-size: 1.3em; font-weight: 500; margin: 0; line-height: 1.6em; } figure.card-profile .author { position: absolute; bottom: 45px; padding: 0 10px 0 120px; margin: 0; text-transform: uppercase; color: #ffffff; -webkit-transform: translatey(50%); transform: translatey(50%); } figure.card-profile .author h5 { opacity: 0.8; margin: 0; font-weight: 800; } figure.card-profile .author h5 span { font-weight: 400; text-transform: none; padding-left: 5px; } figure.card-profile .img-content-card { position: absolute; top: 250px; left: 10%; z-index: 999 }
<div class="service-container"> <div class="layer"> <figure class="card-profile"> <p> lorem ipsum dolor sit amet, consectetur adipisicing elit. magni eveniet voluptate fugit facere accusantium ipsum possimus quae nihil consequuntur saepe distinctio ad quaerat, laudantium deserunt facilis, odit perferendis eaque. modi? </p> <div class="img-content-card"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample3.jpg" alt="sq-sample3" /> <div class="author"> <h5>pelican steve </h5> <span> ceo, psdfreebies.com</span> </div> </div> </figure> </div> <!-- / .layer --> </div> <!-- service-container -->
i can't control img-content-card
, send front of element.
i want show this:
i tried set z-index: 999
.
remove overflow: hidden
figure.card-profile
, comes fore.
please let me know thoughts on this. thanks!
/* profile custom */ .service-container { background: url('http://images.indianexpress.com/2016/05/love-autumn-tree_759_thinkstockphotos-177812216.jpg'); height:500px; width: 400px; } .layer { background-color: rgba(0, 179, 0, 0.6); width: 100%; height: 100%; } figure.card-profile { font-family: roboto_regular; border-style: solid; border-width: 1px; border-color: rgb(255, 255, 255); position: relative; float: left; /*overflow: hidden;*/ margin: 10px 1%; width: 100%; color: #333; text-align: left; } figure.card-profile img { max-width: 100%; vertical-align: middle; border-style: solid; border-width: 6px; border-color: rgb(255, 255, 255); height: 90px; width: 90px; border-radius: 50%; margin: 40px 0 0 10px; } figure.card-profile p { display: block; border-radius: 0px; position: relative; color: #fafafa; padding: 25px 50px 30px 50px; font-size: 1.3em; font-weight: 500; margin: 0; line-height: 1.6em; } figure.card-profile .author { position: absolute; bottom: 45px; padding: 0 10px 0 120px; margin: 0; text-transform: uppercase; color: #ffffff; -webkit-transform: translatey(50%); transform: translatey(50%); } figure.card-profile .author h5 { opacity: 0.8; margin: 0; font-weight: 800; } figure.card-profile .author h5 span { font-weight: 400; text-transform: none; padding-left: 5px; } figure.card-profile .img-content-card { position: absolute; top: 250px; left: 10%; z-index: 999 }
<div class="service-container"> <div class="layer"> <figure class="card-profile"> <p> lorem ipsum dolor sit amet, consectetur adipisicing elit. magni eveniet voluptate fugit facere accusantium ipsum possimus quae nihil consequuntur saepe distinctio ad quaerat, laudantium deserunt facilis, odit perferendis eaque. modi? </p> <div class="img-content-card"> <img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/331810/sq-sample3.jpg" alt="sq-sample3" /> <div class="author"> <h5>pelican steve </h5> <span> ceo, psdfreebies.com</span> </div> </div> </figure> </div> <!-- / .layer --> </div> <!-- service-container -->
Comments
Post a Comment