html - Button Vertical Text -
html
<button class="btn" id="servicos">b</button>
css
.btn{ line-height: normal; display:inline; position:relative; border: 0; margin:0; width:6%; height:95%; font-family:"lucida sans unicode", "lucida grande", sans-serif; padding: 0; background-color: #000000; text-align:center; font-size: 18px; vertical-align:top; }
my problem since button width , height in % text inside button in centered vertically, there way text on top?
enclose "b" span
<button class="btn" id="servicos"><span>b</span></button> <style> .btn{ line-height: normal; color:white; display:inline; position:relative; border: 0; margin:0; width:6%; height:95%; font-family:"lucida sans unicode", "lucida grande", sans-serif; padding: 0; background-color: #000000; text-align:center; font-size: 18px; vertical-align:top; } .btn span{ position:absolute; top:0px; border:1px solid red; } </style>
Comments
Post a Comment