There is solution without using flex
, table
, ... for display
body { padding:50px; }
a {
border-top: 50px solid red !important;
border-left: 25px solid transparent !important;
border-right: 25px solid transparent !important;
height: 0;
width: 150px;
font-size: 14px;
letter-spacing: 1px;
color:#000;
text-transform: uppercase;
text-decoration:none;
position:relative;
display:inline-block;
}
a span {
position:absolute;
left:0; right:0;
top:-50px;
height:50px;
text-align:center;
line-height:50px;
}
<a href="#"><span>Read More</span></a>
<a href="#"><span>About</span></a>
Into css for a
add position:relative; display:inline-block;
.
Since, a
is height of 50px, "under" a
add span
element.
span
will be positioning/filled into a
using position:absolute
and top:0; let:0; right:0
, but, instead bottom:0
I use height:50px;
(from Your css for a
border-top: 50px solid red !important;
). At the end, align text into center (text-align:center;
) and use line-height:50px;
for vertically centering text.
Using this way You'll use basic css. This will work event on IE7.