Skip to:
Content
Pages
Categories
Search
Top
Bottom

IE destroys my custom home page

  • Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    Oh crap! My custom home page looks and works just fine in Firefox, but dumb ol’ IE8 just doesn’t get it.

    The problem appears to originate with header and/or adminbar
    - header and adminbar occupy the full monitor width
    - header height is adjusted (shows fine on other pages) but doesn’t work on home page
    - the adminbar appears below the content, just above the footer
    - the sidebar (including right margin) seems to think it should float:right, whereas it’s set to float:left

    If anyone could take a look in Firefox and in IE and throw out some ideas, I would really appreciate it. I’ve been at it for hours and I’m at a loss for now.
    Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Avatar of Hugo
    Hugo
    Moderator

    @hnla

    @pcwriter you don’t provide anything for anyone to look at :)

    However whenever anyone states that something works on one page but not another that generally means that there is somewhere what should be fairly obvious differences in markup or CSS between the two.

    Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    I’m afraid to say that the layout does not hold together in Opera either and this is a ‘Modern’ generation browser that supports Standrds and CSS very well.

    Validating markup is key to many layout issues and even mod1 eyeballs.

    <php
    /*
    Template Name: Custom Front Page
    */
    ?>
    At the top of your index page is causing sgml parsers to void the DTD declaration you need to correct this error initially then look at how the layout stacks up, at the moment you are forcing browsers into ‘Quirks Mode’ each and every browsers will give you a different take on what it thinks is the correct rendering of the page.

    There are other markup issues which you will need to address such as illegal nesting of elements; an anchor element may not contain Block level elements such as divs, and there is no proscribed manner in which browsers are meant to correct malformed markup, they make a best guess stab at things and clearly IE8 is struggling with that although it will suffer more than other browsers from being forced to render in quirks mode, it’s only a half decent browser when allowed to render in ‘Standards Mode’.

    One last thing and please don’t take offense but that roaming toolbar thing is extremely irritating and if a client asked me to implement something like that I would simply and flatly refuse :)

    Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    @hnla

    Thanks for taking a hard look. Clearly, I need to learn more about what’s allowed and what’s not. I “borrowed” the code and css from another template in an attempt to widgetize my home page, but the evidence would suggest that I’d be better off knowing what I’m doing rather than diving in and hoping for the best ;-)

    Thanks again!

    Oh yeah, I agree about that toolbar thing… it’s gone.

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    :) Add the html validator plugin for Firefox that will give you real time sgml validation that matches the W3C validator but offline has you develop

    Avatar of pcwriter
    pcwriter
    Participant

    @pcwriter

    @hnla

    Thanks for the heads up about the plugin; it helps a lot! It’s like having an in-home tutor wagging his finger when I get ahead of myself.
    And sometimes it’s the most obvious that escapes me… The thing that completely screwed up the page was what you had noted above:

    <php
    /*
    Template Name: Custom Front Page
    */
    ?>

    Should read: <?php …

    Corrected that missing “?” and voilĂ … the page sorted itself out in IE.
    Now it’s a question of fixing a bunch CSS/XHTML “oopses” (mostly improperly formatted tags and such).

    Thanks again!

    Avatar of Hugo
    Hugo
    Moderator

    @hnla

    Great stuff, the validator will help to identify problems, but don’t get frustrated trying to correct all errors or warnings it may report; to some extent due to the nature of third party plugins and WP you will find errors introduced that simply prove too awkward to fix without going into the core plugin files to fix things, mostly these will be minor errors that browsers will attempt to correct. There are a few bad ones I’ve seen recently though such as style tags being incorrectly added into the document ‘body’ element when the tag can only ever exists in the ‘head’ at least though you will be warned of the issue and can choose to track down and correct or live with if not causing total layout failure.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.