dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: How do you align an image vertically in the middle of a DIV?

  1. #1
    Join Date
    Apr 2009
    Posts
    346

    How do you align an image vertically in the middle of a DIV?

    I have an image that I need to align in the middle of a DIV but I don't know how to make it align vertically like you can with a table cell. Anyone know how to do this?

  2. #2
    Join Date
    Sep 2006
    Location
    new york
    Posts
    267

  3. #3
    Join Date
    Nov 2006
    Location
    Oakland
    Posts
    500
    Your need to specify the height of your div tag first.
    Then once the image is in, define the top and bottom margins of the image to be auto.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles