Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

What I learned from this weekend's re-design

This past weekend, I re-designed the Content Viewer's interface I wrote for OnPoint Digital. The major motivation behind the mini-project was to make the CV compatible with IE 5.5 and Opera 6 on Linux. It was a nightmare because of the lack of DHTML support in Opera, and also because of IE. So I came to the conclusion that I hate IE, Opera and Safari. My main reason is because they do everything so different - why don't they adhere to standards (Mozilla does)?! It makes web development so much harder when you have to test 5 browsers on 3 platforms. Hopefully I'm a better developer from the experience, and here's a short list of things I learned.

  • The CSS rule "position: fixed" doesn't work in IE, but works in all other browsers. This is a great rule, allowing you to pin an element to a location in a page. For instance, you can have a floating menu or footer using this. You can achieve similar functionality in IE using CSS Expressions (a non-standard extension). For instance, to keep a footer at the bottom of a page, you could use something like this:

    div#footer {
      position: absolute;
      top: expression(document.body.scrollTop + document.body.clientHeight - offsetHeight);
      left: expression(document.body.scrollLeft + document.body.clientWidth - offsetWidth);
    }

  • If you're using standards-compliant mode in IE 6, you have to use document.documentElement in place of document.body above.
  • Using standards-compliant mode in IE with frames will just create headaches for you and you'll end up with a horizontal scrollbar unless you make the body's width 95%. An easier way is to remove the doctype and not go with standards-compliant mode.
  • If you're supporting IE 6 and IE 5.5, remove the XHTML doctype (which makes IE 6 standards compliant) - this will make the two browser's behavior more consistent.
  • Opera 6 doesn't recognize the "background: transparent" css rule for <button>'s.
  • Opera 7 doesn't recognize the "width: 65px" css rule for buttons. Maybe this is only when you have an image on the button. I found that my buttons in Opera 7 were only as wide as the images on them.
  • In Opera 6, you can't copy the contents of one <div> to another <div>. With all the other browsers, it's easy using document.getElementById('divId').innerHTML. This does not exist in Opera - I'm still hoping to find a similar way of doing this.
  • Opera 7 and Safari have strange position bugs or maybe they're more standards-compliant than the other browsers, but I doubt it. In Opera 7, I have a buttons div that ends up at the top left corner of the header, when they should be aligned more in the middle and 100px from the left. In Safari, this same buttons <div> stacks the <button>'s on top of each other, rather than side-by-side, like you'd expect a row of buttons to look.

I'm glad I don't need to support Opera 7 or Safari for the app, but it's annoying that they behave so differently. Camino, of course, works great, and so does Mozilla. You write your JavaScript or CSS according to the standards, and it works in Mozilla, perfectly. What a beautiful browser.

Posted in The Web at Apr 16 2003, 08:31:31 AM MDT 2 Comments
Comments:

If you're using standards-compliant mode in IE 6, you have to use document.documentElement in place of document.body above.

Thank you! That's what I was looking for. Found you on Google. :)

Posted by Hershel Robinson on November 26, 2003 at 07:24 AM MST #

Great advice! I've been fighting IE for weeks with features that just work on firefox/mozilla.

Thanks,

Scott

FYI
On my testing with IE 6, standards-compliant mode moves canvas attributes that used to be in the body to the html tag. e.g. After setting '<html style="width: 95%;">', the footer would show up AND the browser would appear to continue to render in standards-compliant mode.

CSS Enhancements in Internet Explorer 6
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp

Posted by Scott Oberg on September 29, 2005 at 06:01 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed