The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › vertical centering doesn't work for element
vertical centering doesn’t work on legend element..
any ideas..? I have some text inside legend element, which I want to be centered vertically inside…
Thank You Jamy…
tried it with no luck….
looks like User agent style sheet is overriding display:table-cell..
I tried !important.. even though it is not working…
You don’t really need a table at all to achieve it…
from legend and then adjust the element’s height by padding and/or line-height
It works… I wonder what height has to do with display:table-cell?
display:table-cell works for div even though you mention height for the div…
can you please explain this difference…?