The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript CSSing dynamic JS content

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #157450

    (sales guy here, not a coder so go easy on me :) )

    posting this in JavaScript as the CSS issue is (i think) based on the way I’m returning a block of text. open for suggestions if i’m not implementing this correctly.

    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 – blue wrapper at bottom)


    sometimes vertical-align: middle works. see this article from css-tricks


Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.