Forums

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

Home Forums CSS Center div within dynamic height and width?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34913
    Niplo
    Participant

    Hello!

    I’m trying to center a div that holds the title of my post in my wordpress theme – the images will all be different sizes. Currently I’m using relative/absolute positing with percentages on the top and left values. This is not working perfectly.

    Does anyone have any ideas on how to achieve this?

    Link:
    http://juniorvicepresidents.com/

    Cheers!

    #89684
    Johnnyb
    Member

    Hey Niplo, I actually wrote an article about a way to do this with jQuery on my blog a little while ago: http://johndoesdesign.com/blog/2011/jquery/centering-an-element-using-jquery/ Let me know if it’s helps. Scroll down to the bottom for the final code.

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