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

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -