Results 1 to 5 of 5

Thread: XML and Fixed Layout problem

  1. #1
    Join Date
    Feb 2007
    Location
    Sun City, AZ
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation XML and Fixed Layout problem

    Love the way the CSS Fixed Layout #3.1- (Fixed-Fixed-Fixed) works. It is great. However, when I add the line of:
    HTML Code:
    <?xml version="1.0"?>
    to it at the top of the HTML all of the centering goes out the window in IE and becomes left aligned. Does anyone know a hack the will solve the centering / left alignment problem when using the XML statement? I have a PHP file that relies on the XML in order to work. Any help will be appreciated. Thanks

    Jeff Hansen - (TeamJH)
    Last edited by Tau'ri; 06-14-2007 at 08:48 PM.

  2. #2
    Join Date
    Feb 2007
    Location
    Sun City, AZ
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Does anyone know of a work-around for this?

  3. #3
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    use HTML 4.01 strict instead of XHTML.
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  4. #4
    Join Date
    Feb 2007
    Location
    Sun City, AZ
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by boxxertrumps View Post
    use HTML 4.01 strict instead of XHTML.
    Is this what TWey is talking about in another thread? If so, Moderators, could you please edit this reply to reflect the reference? Thanks.

    Jeff Hansen - (TeamJH)

    Place appropriate link here.

  5. #5
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I've discussed it in countless threads, and never got around to writing a sticky. It would probably be a good idea.

    The bug you're running into at the moment, however, isn't that, although it is related. Usually, even though it doesn't actually understand XHTML, IE will parse an HTML page with an XHTML DOCTYPE in standards compliance mode. However, because it doesn't actually parse the page as XML, the XML prologue before the DOCTYPE causes it to ignore the DOCTYPE and throws it into quirks mode (as it should). In IE7 they have worked around this by making a specific exception for XML prologues.

    The answer is simple: serve either XHTML or HTML, and make sure your content types and DOCTYPEs match. As a rather poor workaround, you could also remove the XML prologue: it must be unnecessary anyway, or your page wouldn't render properly in IE, which ignores it.
    Last edited by Twey; 06-24-2007 at 11:23 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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