html - Getting text to align at top of large element -
the problem have
element 78px large. need align text right of <p>
element , @ top wants align text center of element.
is there way fix this?
<span> <p>1</p> <span> <p>first,</p> <p>to insured, promist pay valid claims promptly, , efficiently.</p> </span> </span>
css
.cont .mid { padding-top:20px; } .cont .mid span { float:left; text-align: left } .cont .mid span > p { float:left; color:#a01d3b; font-size:78.12px; font-family: 'oswald', sans-serif; } .cont .mid span span { } .cont .mid span span > p { } .cont .mid span span > p:first-child { font-size:16.67px; color:#454545; text-align:left; float:left; } .cont .mid span span > p:last-child { font-size:9.37px; color:#9a9a9a; text-align:left; float: left }
span{text-align:right} span > p:first-child{text-align:center}
you may need add .cont .mid part, since see no reference it, there go. either way, best can use classes, that's css made for, can this:
<span> <p class="centered">1</p> <span class="rightalign"> <p>first,</p> <p>to insured, promist pay valid claims promptly, , efficiently.</p> </span> </span>
and can use .centered , .rightalign anywhere in site replacing css code gave classes respectively
.rightalign{text-align:right} .centered{text-align:center}
Comments
Post a Comment