Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ajt (2546)

ajt
  (email not shown publicly)
http://www.iredale.net/

UK based. Perl, XML/HTTP, SAP, Debian hacker.

  • CPAN: ATRICKETT [cpan.org]
  • PerlMonks: ajt [perlmonks.org]
  • Local LUG: AdamTrickett [lug.org.uk]
  • Debian Administration: ajt [debian-adm...ration.org]
  • LinkedIn: drajt [linkedin.com]

Journal of ajt (2546)

Wednesday February 25, 2004
08:22 AM

Nasty, broken, IE thing!

[ #17615 ]

This morning I have been working on a XSL Template for our site at work. Our nice graphic designer made a mock-up in Adobe Illustrator, which he then converted to HTML using Macromedia NightmareWeaver. I then had to make an XSL Template to convert our source XML into his result HTML.

NightmareWeaver produces utterly awful HTML if you let it, a gazillion tables and table cells, unique style names for everything, and no logical hierarchy at all. Making this with XSLT is an evil and thankless task, which I frankly was not looking forward to.

So instead of producing a page that used his HTML, I junked it, and decided to make the page using standard compliant xhtml and CSS. Most of the mark-up that NightmareWeaver produces seems to be tables - it's very good at tables, and many of them seem to serve no useful purpose, so I just deleted them wholesale. Then I put the bits that needed to be in different logical containers into DIVs, and at a stroke I'd removed over 50% of the HTML. Generating my xhtml from XSLT is much easier and simpler to do, so that took no time at all.

Then the fun begins. Looking at the page in Firefox, it's a bit Spartan, so I started to add rules to the CSS style sheet. One by one, I moved the logical blocks into their correct location and set their appearance. All works pretty much as you'd expect, Firefox does what you would expect, and with it's excellent development tools, it's great to see what's going on when you screw up!

As I was getting close I quickly tested in Opera, as I expected it was perfectly happy too. It's a fine browser, a bit more picky than gecko based ones - good for finding mark-up bugs, but it's not as nice as a developer tool so I don't use it as much as Firefox.

Then I looked at in IE6. It got the page all wrong, the mark-up and style is correct, but IE6 doesn't get the layout right. I then start the tweaking, adding stuff to make IE6 work, and hoping that it's not going to break Opera or Firefox/Mozilla. One by one I eliminated the bugs, it took longer to fix for IE6, than it did to create in the first place.

I HATE IE6, ignoring it's awful security track record, it's lousy usability, lack of PNG support, it really annoys me how poorly it supports the standards, standards that Microsoft helped to create!

Using IE6 is like watching B&W analogue TV, when glorious, digital, 16:9 ratio, colour is available.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Chances are you're discovering that IE implements the CSS box model incorrectly. You can work around this using the voice-family hack [tantek.com]. I reccomend the Bad Hat [zeldman.com] book for more discussion...

    -Dom

    • If only! In this case it's a float bug. I have the DTD set correctly so IE6 should be using the correct box model, and at this stage I don't care about IE5's totally broken implementation.

      The man in the scary hat is a jolly clever chap, and I read his book while stuck in hospital last year - a very useful read indeed. I keep trying to get people to read it. I've not rad it yet, but Eric Meyer On CSS [ericmeyeroncss.com] may also be a goo read.

      My problem is that IE5 and IE6 do odd things with floats. Mozilla and Opera do wha

      --
      -- "It's not magic, it's work..."
    • I tend to prefer to exploit the CSS-BE support in IE to spoon-feed it special instructions: .class
      {
          width: 300px;
          width: expression( '400px' );
      }
  • Perhaps HTML Tidy [w3.org] can help? The last version I tried (I haven't upgraded in a while) did do basic conversion from presentational markup, FONT tags and friends, into CSS — even though somewhat buggy.

    I really ought to look into the upgrades.

    • Tidy [sourceforge.net] is pretty good at fixing bad HTML, as is libxml2 [xmlsoft.org], however they are no good at at de DreamMangling a page, for that you have to do it by hand. However, that job is now done!

      Both tidylib and libxml2 can be used from within Perl, so they are also great for on the fly HTML cleaning too. If only it was possible to on the fly upgrade IE users to Firefox or Opera.....

      --
      -- "It's not magic, it's work..."
  • I absolutely refuse to pander to IE any longer. HTML 4.0 is SEVEN years old (and 4.01 is FIVE), and CSS1/2 is from around the same time.

    How many of us have COMPUTERS that old? (yeah ok there's still lots of them out there, but they all have to be replaced eventually, as they die off from hardware failure or desire to upgrade)

    well, let me just sum up my feelings from an html comment I embedded in some client-side code recently. Evil aren't I? :)

    <rant>

    A mixture of original hand-coded HTML 4.01, Casc
    • I had forgotten how old HTML4.0 is. What is even worse is that MS co-wrote the damn thing, and you would think that in seven years they would have enough time to actually adhere to the specification they helped to write!

      As I said previously, this is ignoring all the other things wrong with IE!

      --
      -- "It's not magic, it's work..."
  • I just kick MSIE out of the game altogether by using this idiom to import a stylesheet:

    <style type="text/css" title="whatever">@import "full_sheet_url" all;</style>

    That "all" there is legal CSS 2, implemented in Firefox, but unimplemented in IE, so IE just ignores the whole statement as far as I can tell. Folks, let me know if this idiom doesn't quite work for you -- I just stumbled on it the other day.

    • Another new trick. I suppose it's a generation on from the original @import hack to protect Netscape 4 and IE 4 from their own failings. Obviously I'd have to check that with recent Opera and khtml based browsers too, but it's another weapon in the armoury.

      In my case I still have to find out why IE is breaking (float bug I think) and do things to the style sheet to workaround the defect.

      --
      -- "It's not magic, it's work..."
  • The IE Factor [stopdesign.com], money paragraphs quoted here.

    Such is often the case when designing with CSS. When working with semi-complex layouts, I frequently encounter challenges that end up slowing me down. I’m getting familiar with these road blocks, and can often predict where I’ll find them. Having patience, or knowing what to try to get around them prevents head from going through monitor.

    Without a doubt, the biggest challenge I encounter each time is in wrangling Microsoft’s Internet Expl

    • I know the feeling totally. IE is so variably buggy, yet so dominant in the market place. IE is probably the biggest impediment to clean modern web design. As Microsoft has officially stated that there will be no major change to IE until Longhorn, it looks like web design will be held back in the 1990s for another few years, or everyone will try a better browser - there are plenty to choose from...

      --
      -- "It's not magic, it's work..."