www.webdeveloper.com
Results 1 to 9 of 9

Thread: Can't vertically-align HTML in IE

  1. #1
    Join Date
    Aug 2008
    Posts
    12

    Question Can't vertically-align HTML in IE

    I've been trying for 2 days to get my text to vertically-align middle in IE, but it just won't listen. I'm building the site www.acadianacomputerrepair.com; the title and menu items need to be aligned to the middle of their div containers, but they want to float to the top.

    I'm setting the parent div's as tables and the child as a table-cell. It works great in firefox and perfect, even in IE, on a simple html test page, but I can't get it to work for the site. I don't know what else to try.

    Can someone help?

  2. #2
    Join Date
    Aug 2008
    Posts
    12
    sorry, the correct address is www.acadianacomputerreapir.info, not .com.

  3. #3
    Join Date
    Jun 2010
    Posts
    54
    It seems to work fine in Firefox 3.6.11, can you post a screenshot of it? Or did you post a link to the test site?

  4. #4
    Join Date
    Aug 2008
    Posts
    12
    Check my second post, it's got the correct link to the test site.

  5. #5
    Join Date
    Jun 2010
    Posts
    54
    The second link doesn't work at all, I guessed it should be http://www.acadianacomputerrepair.info/ and that site worked fine for me.

  6. #6
    Join Date
    Aug 2008
    Posts
    12
    Stupid brain to fingers... Did you check it in IE? It should be aligned to the middle of its div, in the middle of the background. It works in Firefox, not in IE.

    Everyone keeps telling me it's impossible, IE doesn't support the "Table" and "Table-Cell" display properties, so I made this test page:

    www.acadianacomputerrepair.info/test2.html

  7. #7
    Join Date
    Aug 2008
    Posts
    12

    Question

    here is a screenshot:
    http://www.acadianacomputerrepair.in...test_image.png

    Am I doing something different?

    Last edited by talkinggoat; 10-27-2010 at 02:50 PM.

  8. #8
    Join Date
    Aug 2008
    Posts
    12
    It looks like my hosting software is re-writing the doct type. That's why it works on the test page and not the actual site. I'll see if I can correct it and let you know...

  9. #9
    Join Date
    Aug 2008
    Posts
    12
    SUCCESS!!!

    I changed the doctype to <!DOCTYPE XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

    and everything in IE started lining up!

    For anyone using DotNetNuke's hosting software, this solution worked for me:

    Create an XML file named after your loaded skin, like this:
    Example:default.html
    XML: default.doctype.xml

    Inside, place the doctype you want, escaping out the characters...

    <SkinDocType>
    <![CDATA[<!DOCTYPE XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">]]>
    </SkinDocType>

    There should be nothing else in it... parse the skin package and reload. You're done.
    Last edited by talkinggoat; 10-27-2010 at 03:14 PM.

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