Making Your Site Look Great in IE7

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Making Your Site Look Great in IE7 - Presentation Transcript

    1. Making Your Site Look Great In IE7 Markus Mielke Program Manager Internet Explorer Platform NGW042
    2. Making Your Site Look Great in IE7
      • Real focus of this talk: standards based design with IE
      • Will show you:
      • How we prioritized IE7 work
      • Fixes and features
      • How you can prepare for IE7
      • Leave plenty of room for questions
    3.  
    4. How Did We Prioritize IE’s Work?
      • We listened to your feedback
        • Your issues
          • MeyerWeb, PositionIsEverything, Quirksmode, WASP
        • Your requests
          • IEBlog, newsgroups, conferences
      • Our focus: Folks who need to make a living
        • Fixed top pain points/consistency issues
        • Added most-requested standards features
    5. Will Show You
      • How we prioritized IE7 work
      • Fixes and features
      • How you can prepare for IE7
    6. Position Is Everything
      • PIE collects IE6 issues
      • One of the sources we used
      • Focus on making your life easier
    7. And A Bunch Of Other Bugs Too
      • Parser bugs: * html, _property or /**/ comment bug
      • Memory leaks in jscript engine
      • Select control: style-able and not always on top
      • Auto-sizing of absolute positioned element with right and left
        • great for 3 column layouts
      • Relative positioning issues
      • % calculations for height/width for abs positioned elements
      • hover effect working not just over text
      • <?xml> prolog no longer causes quirks mode
      • HTML element truly independent of the Body
      • 1 px dotted borders no longer render as dashed
      • Bottom margin bug on hover does not collapse margins
    8. Overflow Behavior Now Fixed!
      • IE6 used to grow the boxes (even if not asked)
      <style type=&quot;text/css&quot;> div { width : 100px; height: 100px; border: thin solid red;} blockquote { width: 125px; height: 100px; margin-top: 50px; margin-left: 50px; border: thin dashed black} cite { display: block; text-align: right; border: none} p { margin: 0;} </style> <div> <blockquote> <p>some text long enough to make it interesting.</p> <cite>- anonymous </cite> </blockquote> </div>
        • IE6
        • IE7 (and all other modern browsers)
    9. We Also Added Most-Requested Features
      • Extended existing implementation to be consistent with the W3C spec
        • Enable :hover on all elements not just on <a> tag
        • Background-attachment: fixed on all elements not just body
        • Improved <object> fallback
      • Added additional standards features (CSS 2.1 and HTML 4.01)
        • Enhanced Selector support: first-child, adjacent, attribute, and child selectors
          • CSS 3 attribute selectors: prefix, suffix and substring
        • Min/Max Width/Height now in MIX build
        • Fixed positioning support
      • Alpha channel PNG support
    10. New Standards Features In Action
      • Fixed positioning
      • Transparent PNGs
      • Background-attachment: fixed on all elements not just body
      • Hover on all elements to build richer menus
    11. Other Ways To Make Your Site Great
      • Native XMLHTTP
      • High Assurance SSL Certificates
      • IE7 integration with Windows RSS Platform
      • Open Search
    12. Will Show You
      • How we prioritized IE7 work
      • Fixes and features
      • How you can prepare for IE7
    13. How Does It Affect You?
      • Behavior changes for better standard support mean some pages break
        • Need to balance standard compliance with app-compat
        • IE6 introduced quirks mode and strict mode
        • All fixes are under strict mode
      • We are here to help you
        • Compatibility lab at MIX
        • Most common breaks and mitigation
        • Tools to identify and fix breaks
        • Documentation up on MSDN
    14. Common Breaks And How You Can Easily Fix Them
      • User Agent Strings and Browser Detection
        • If you need a switch, base it on “greater equal” rather than “equal”
      • Overflow
        • Use min-height/width or correct box size
      • XML Prolog Bug affecting the CSS Box Model
      <?xml version=&quot;1.0&quot;?> <!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;DTD/xhtml1-strict.dtd&quot;>
    15. CSS Hacks
      • Community workaround: CSS hacks
        • Rely on parser bugs and/or not yet implemented features
        • Likely to break from release to release
      • Examples of hacks that broke:
        • * html (Target: IE only)
        • _height:50px; (Target: IE only)
        • height/**/: 300px; (Target: Everyone but IE)
        • html > body (Target: Everyone but IE)
      • Ideally no CSS hacks are needed – but they are
        • Alternative: Conditional Comments to target browser versions
        • Maintainable and available since IE5
      <!--[if lte IE 6]> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;iestyles.css&quot; /> <![endif]-->
    16. The Holly Hack and Has Layout
      • Most famous CSS Filter break: the Holly hack
        • * html {height:1%;}
      • Used to force “Has Layout”
        • IE internal data structure – still exists in IE7
        • Responsible for sizing and positioning itself
        • Article produced in cooperation with WASP http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ietechcol/cols/dnexpie/expie20050831.asp
      • What can you do?
        • IE6 and below: Use of Holly hack is ok
        • IE7 (if needed): conditional comments + zoom:1;
    17. How Do We Analyze Breaks?
    18. What’s Next For IE
      • With the release of the MIX build we are locking down layout changes
        • Please test your pages!
      • We know we are not done yet
        • Committed to full CSS2.1 support in the future
      • Working on public bug database where you can report and track your issues
    19. Call To Action
      • Dev community and Microsoft are dependent on each other
        • Improvements in standards support mean that behavior will change
        • End users do not like broken pages
        • So we need your help!
      • Please prepare your pages to be ready for IE7
      • Please send us feedback - [email_address]
      • We have great documentation that will help you: www.msdn.com/ie
    20. Community Resources
      • At MIX
        • MIX Chat – We’re heading over there after this talk!
        • IE Compatibility lab
      • After MIX
        • IE Dev Center: http:// msdn.microsoft.com/ie /
        • IE Blog: http://blogs.msdn.com/ie/
        • IE feedback alias: [email_address]
    21. Session Evaluations We value your feedback, so please submit an online evaluation for each session you attend! To make it worth your while, we pick one evaluation from each of the ten session timeslots. If we pick your eval, you will be eligible to win a Creative Zen MicroPhoto
    22. Appendix
    23. 3 Pixel Text Jog Before (IE6) and After (IE7)
      • IE7:
      • Before:
      Notice the gap?
    24. A Word about HasLayout
      • Are there side effects?
      • Content of the element cannot flow around other boxes
        • bad for float based layouts
      • An element with layout cannot &quot;shrink to fit&quot; its children
      • Can I still force layout in IE7?
      • Yes, {zoom:1;} still works
    25. HTML element independent of Body
      • Viewport of Scrollbar is now outside of the HTML element
        • Accordance with section 11.1.1 in CSS2.1 spec
      • Viewport has 2px window border that can not be influenced
      • Benefit:
        • Set margins on HTML element
        • Size the HTML element
        • Set borders etc.
        • Allows absolute/fixed positioned elements on the right viewport edge
    26. auto alignment for building flexible 3-column layouts
      • <style>
      • body {
      • margin: 0px; background:#333;
      • }
      • #left {
      • position: absolute; top: 20px; left: 20px;
      • border: 5px solid #ccc; background: #666;
      • width: 120px;
      • }
      • #middle {
      • position: absolute;
      • border: 5px solid #ccc; background: #666;
      • top: 20px; bottom: 100px;
      • left: 170px; right: 170px ;
      • }
      • #right {
      • position: absolute; top: 20px; right: 20px;
      • border: 5px solid #ccc; background: #666;
      • width: 120px;
      • }
      • </style>
    27. Conditional comments
      • An easy way to target specific browser versions
        • Maintainable and available since IE5
        • Rich expressions (lt, lte, gt, gte etc.)
        • Based on HTML comment syntax
      • Use to provide special style sheet:
      <!--[if lte IE 6]> <link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;iestyles.css&quot; /> <![endif]-->
    28. Why shouldn’t we use filters?
      • We would not recommend to use CSS filters since they are not supported
        • Neither by standard body nor implementers
      • Are there inherently bad?
        • No, if they are used with caution
        • Target ONLY &quot;older than current&quot; (frozen or abandoned) versions of browsers
        • Be aware that they are filters (Mark them for maintainability)
    29. Overflow (1of 2)
      • Overflow allows to specify whether content of a block-level element is clipped when it overflows the box
      • IE6 used to grow the boxes (min-height)
        • Prevented us from implementing min/max-width/height
      • Look at code:
      <style type=&quot;text/css&quot;> div { width : 100px; height: 100px; border: thin solid red;} blockquote { width: 125px; height: 100px; margin-top: 50px; margin-left: 50px; border: thin dashed black} cite { display: block; text-align: right; border: none} p { margin: 0;} </style> <div> <blockquote> <p>some text long enough to make it interesting.</p> <cite>- Foo </cite> </blockquote> </div>
    30. Overflow (2 of 2)
      • The CSS2.1 default is overflow: visible
      • All sites that tended to enlarge boxes will now overflow
      • We only implemented this for non-replaced block level elements and inline-block elements
        • Not supporting table-cells
        • pages will still be printed using the old behavior
      Before IE7
    31. Native XMLHTTP
      • In IE7, XMLHTTP is now also exposed as a native script object
      • Can be instantiated using the same syntax across different browsers
      • Decouples AJAX functionality from an ActiveX enabled environment
      Syntax if (window.XMLHttpRequest){            // If IE7, Mozilla, Safari, etc: Use native object            var xmlHttp = new XMLHttpRequest() } else { if (window.ActiveXObject){            // ...otherwise, use the ActiveX control for IE5.x and IE6           var xmlHttp = new ActiveXObject(&quot;Microsoft.XMLHTTP&quot;);           } }
    32. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
    SlideShare Zeitgeist 2009

    + goodfridaygoodfriday Nominate

    custom

    479 views, 0 favs, 0 embeds more stats

    In this session, learn how to build and maintain st more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 479
      • 479 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 1
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories