The forums ran from 2008-2020 and are now closed and viewable here as an archive.
(sales guy here, not a coder so go easy on me :) )
Have a wrapper div which holds (several) container divs one of which gets dynamically updated via JS into 6 lines of “p” tags.
I would like this block of text to be centered (all around). centering horizontally is fine using text-align but I can’t for the life of me center it vertically.
I thought using margin: auto (-top:auto :bottom-auto) would work but it doesn’t.
I can add padding but that drives down the whole div down which would sit below the wrapper.
Can anyone help out the NEWB?
(site link http://www.kwmds.com/dynamic – blue wrapper at bottom)
sometimes vertical-align: middle works. see this article from css-tricks