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

Thread: Duplicating display:table-cell in IE

  1. #1
    Join Date
    Apr 2005
    Location
    Vancouver, BC
    Posts
    129

    Duplicating display:table-cell in IE

    I have a div that needs the text to be vertically aligned middle so the dynamic text (users name) will fit nice if it appears on 2 lines. However, with IE7, I'm having trouble achieving the same results since it doesn't support table properties.

    Can anyone suggest an elegant solution to this very annoying problem? thanks.

  2. #2
    Join Date
    Nov 2010
    Location
    Los Angeles, CA
    Posts
    234
    You can use padding. Give the div a padding-top value large enough so that the text appears vertically aligned in the middle. You can use the vertical-align rule on an inline element to do this, but divs are block elements.

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