3
votes

I've designed a website. However, line-height is not working in Opera Mini.

.lbl-name {
    height: 30px;
    line-height:30px;
}

How can I fix this?

2
do you really want to support Opera mini? - kumarharsh
So who exactly supports Opera Mini now a days? dev.opera.com/articles/view/… - Andreas Louv
you also have other options like padding, font-size as well - Mehar
And this article can maybe help you: phrogz.net/CSS/vertical-align - Andreas Louv
ty for all comments, i will try "display:table-cell; vertical-align:middle;" - sertacyarbas

2 Answers

5
votes

Opera Mini miss all line-height's values and render all with line-height: normal. I can't find proof any link, but on my developing experience(5 years support mobile sites, and for opera mini too) this is true.

EDIT (add proof link):

Opera Mini use system fonts for render texts, because a lot of devices can't render none-system fonts. So it do not apply font-size/line-height CSS properties.

0
votes

Use these definitions:

display: table; 
vertical-align: middle; 
height:50px; 

For child tag:

display: table-cell;
vertical-align: middle;