IE7 CSS conundrum

Discussion in 'HTML' started by Shanx, May 4, 2007.

  1. Shanx

    Shanx Guest

    One of my sites has been XHTML 1.1 for quite some time. It works
    perfectly in Opera (6 onwards), Firefox (1.5 onwards) and IE through
    the last version 6. It is only with the recent IE7 update that somehow
    the layout is broken, e.g., http://sniptools.com/musings/conan-calls-a-spade-a-spade
    -- the background image has a CSS of being centered through the middle
    of the <body>, but it shows up a bit to the right on IE 7, with a
    horizontal scroll bar. Funnily, the exact same CSS basically works on
    the main page: http://sniptools.com/ (although that too is off the
    left margin by a pixel or two). I'd appreciate any thoughts as to why
    this is happening? Optimistic side of me hopes that this can be fixed
    with some simple tweak that I'm overlooking because rewriting the
    whole columnar design would be a huge PITA. Many thanks in advance!
     
    Shanx, May 4, 2007
    #1
    1. Advertising

  2. Shanx

    JWL Guest

    Shanx wrote:
    > One of my sites has been XHTML 1.1 for quite some time. It works
    > perfectly in Opera (6 onwards), Firefox (1.5 onwards) and IE through
    > the last version 6. It is only with the recent IE7 update that somehow
    > the layout is broken, e.g., http://sniptools.com/musings/conan-calls-a-spade-a-spade
    > -- the background image has a CSS of being centered through the middle
    > of the <body>, but it shows up a bit to the right on IE 7, with a
    > horizontal scroll bar. Funnily, the exact same CSS basically works on
    > the main page: http://sniptools.com/ (although that too is off the
    > left margin by a pixel or two). I'd appreciate any thoughts as to why
    > this is happening? Optimistic side of me hopes that this can be fixed
    > with some simple tweak that I'm overlooking because rewriting the
    > whole columnar design would be a huge PITA. Many thanks in advance!


    Try commenting out the #titlenav div.
     
    JWL, May 5, 2007
    #2
    1. Advertising

  3. Shanx

    cwdjrxyz Guest

    On May 5, 4:00 am, JWL <> wrote:
    > Shanx wrote:
    > > One of my sites has been XHTML 1.1 for quite some time. It works
    > > perfectly in Opera (6 onwards), Firefox (1.5 onwards) and IE through
    > > the last version 6. It is only with the recent IE7 update that somehow
    > > the layout is broken, e.g.,http://sniptools.com/musings/conan-calls-a-spade-a-spade
    > > -- the background image has a CSS of being centered through the middle
    > > of the <body>, but it shows up a bit to the right on IE 7, with a
    > > horizontal scroll bar. Funnily, the exact same CSS basically works on
    > > the main page:http://sniptools.com/(although that too is off the
    > > left margin by a pixel or two). I'd appreciate any thoughts as to why
    > > this is happening? Optimistic side of me hopes that this can be fixed
    > > with some simple tweak that I'm overlooking because rewriting the
    > > whole columnar design would be a huge PITA. Many thanks in advance!

    >
    > Try commenting out the #titlenav div.


    If you go to the W3C validator, you will find 9 xhtml 1.1 validation
    errors. Although the code is written as xhtml 1.1, it is not served
    properly, so it is just being served as text/html which is indicated
    at the W3C validator using the extended interface. When served
    properly as xhtml, a page can not be viewed on any IE browser
    including IE7. Typically to serve as xhtml properly, on the server you
    would associate a xhtml mime type such as application/xhtml+xml with
    an extension such as .xhtml, since .html usually is reserved for the
    mime type text/html on the server. To view on IE you must either mis-
    serve the page as text/html as you have done for it or serve as html
    4.01 strict. This sometimes is done with a php include in the header
    exchange. As you are now mis-serving the page, using xhtml serves
    absolutely no usual purpose, and you should use html 4.01 strict, or
    go to the considerable trouble to serve the page correctly as
    application/xhtml+xml for browsers that can handle it and as html 4.01
    strict for browsers such as IE that can not.
     
    cwdjrxyz, May 5, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Owen

    Clunky Cache Code Conundrum?

    Jim Owen, Jul 3, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    374
    dave wanta
    Jul 3, 2003
  2. Iain
    Replies:
    0
    Views:
    362
  3. Nobody
    Replies:
    6
    Views:
    662
    Hemal Pandya
    Jul 14, 2005
  4. VisionSet

    RMI conundrum

    VisionSet, Dec 23, 2005, in forum: Java
    Replies:
    2
    Views:
    377
    VisionSet
    Jan 2, 2006
  5. Jeff Louella

    IE7 on XP vs IE7 on Vista

    Jeff Louella, Mar 1, 2007, in forum: HTML
    Replies:
    9
    Views:
    539
    Adrienne Boswell
    Mar 2, 2007
Loading...

Share This Page