html - Center type accurately within my headline div -
i'm having issues trying find way center h2 within div class called headline-services.
i have text-align:center; applied h2 (only) allowing text center within (text) , it's not centering text within div box. accomplish have white text in center of greenish box.
// note //
the text may centered it's not accurate... i've applied padding-top h2 class allowing move downwards towards center of box mentioned before not accurate way go centering h2 within div.
http://kapena.github.io/pp_web/
.plumbing-repairs{ font-family: avenir; padding-left: 20px; padding-right: 20px; font-size: 50pt; color: white; margin: 0px; text-align: center; padding-top: 55px; }
you can add together next lines of css element want center vertically;
position: relative; top: 50%; transform: translatey(-50%);
reference
also, clarity, text-align:center;
applies horizontal centering.
html css zurb-foundation
No comments:
Post a Comment