SlideShare a Scribd company logo
1 of 23
Goal is predictability
                           across browsers




                              All content is
                               standards
                               compliant
Pre-standards



                Present
Session Objective(s):
  Discuss the new layout engine and its
  capabilities
  Explain the strategy for improved standards
  compliance in IE8 layout
  Introduce version targeting and how it may be
  used to maintain site compatibility
Key Takeaway – Understand how Internet
Explorer 8 is delivering improved standards
compliance and what this means for your
web site now and in the future
• Great typographic
                  foundation
    New
                • Designed with CSS 2.1
Layout Engine
                  spec in hand
                • Deprecation of hasLayout
  MSHTML
Tenet #1 – Better support for web standards


                     MODES
                                    IE 8
                                    • CSS 2.1 layout +
                                      Javascript / OM
                                      improvements


                                        IE8 Layout
Goal = CSS 2.1 compliance
Great progress to date: ACID2 displays correctly




Additional Resources
        Video
        Blog post
9.3.1 Choosing a positioning scheme: 'position' property
Path to CSS 2.1 compliancethe normal flow (this is
                                                 not crystal
The box's position is calculated according to
clear position in normal flow). Then the box is offset relative to its
called the
normal position. When a box B is relatively positioned, the position of
the followingof test suite though B were not offset. The effect
     Lack box is calculated as
of 'position:relative' on table-row-group, table-header-group, table-
          Contributing tests to the W3C
footer-group, table-row, table-column-group, table-column, table-cell,
and Areas of elements is undefined.
     table-caption ambiguity in spec


Driving principle = Interoperability
    Follow the spec to the letter
    For areas of ambiguity, seek clarification from
    the working group
       Compare browsers and propose common ground
       Propose solution that is in line with the intent of the
       spec
Enable new
                  Enable new
            experiences
                  experiences



Existing sites
  just work Existing sites
               just work
Tenet #2 – Allow developers to choose IE7
compatibility mode if they want / need it
                                         MODES
IE <= 6                            IE 7
• Quirks mode                      • Standards mode




                      IE7 Layout*

*Security fixes made to IE7 layout code path may cause changes in behavior from IE7 to IE8
Multiple layout modes provide support for Quirks,
Standards, and IE8 Standards modes
                             MODES
IE <= 6               IE 7                    IE 8
• Quirks mode         • Standards mode        • CSS 2.1 rendering
                                                + Javascript / OM
                          Mode must be          improvements
                         enabled via opt-in

                IE7 Layout                       IE8 Layout

                                                 Default = best
                                                standards mode
Common Name         Compatibility Mode
                                         Declared <META>
                    Value
                                         overrides
Quirks              IE=5
                                         <!DOCTYPE>
IE7 Standards       IE=7
                                         Compatibility mode
                                         switch can “lock-in”
IE8 Standards       IE=8
                                         Quirks and IE7
Always Use Latest   IE=edge
                                         Standards modes as
Mode
                                         well
  <script type=quot;text/javascriptquot;>
  // What mode is my document in?
  document.write(quot;My document is in IEquot; +
  document.documentMode + quot; compatibility modequot;);
  </script>
Opt-in via <META> tag or HTTP header
<!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.0 Strict//ENquot;
quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdquot;>

<html xmlns:web xmlns=quot;http://www.w3.org/1999/xhtmlquot; lang=quot;enquot;
xml:lang=quot;enquot; class=quot;liveApp la_en lo_us IE IE_8quot;>
<head>
        <title>Test Page</title>
        <meta http-equiv=“X-UA-Compatible” content=“IE=8” />
        <meta http-equiv=quot;Content-Typequot; content=quot;text/html;
        charset=utf-8quot; />
        <meta name=quot;descriptionquot; content=quot;Find exactly what you are
        looking for – FAST!quot; />
        <meta name=quot;ROBOTSquot; content=quot;NOODPquot; />
         <link rel=quot;stylesheetquot; type=quot;text/cssquot;
        ref=quot;stylesheets/standards.cssquot; />
</head>
Call to action: update User-Agent string sniffing

User-Agent Sniffing
Incorrect:
if ( ver > -1 )
  {
    if ( ver == 7.0 )
      msg = quot;You're using a recent copy of Internet Explorer.quot;
    else
      msg = quot;You should upgrade your copy of Internet Explorer.quot;;
  }

Correct:
if ( ver > -1 )
  {
    if ( ver >= 7.0 )
      msg = quot;You're using a recent copy of Internet Explorer.quot;
    else
      msg = quot;You should upgrade your copy of Internet Explorer.quot;;
  }
Call to action: update conditional comment blocks

Conditional Comments
If document is IE8 Standards:
<head>
<title>Test Page</title>
/* pass down-level browsers style fix-ups */
<!--[if lte IE 7]>
<link rel=quot;stylesheetquot; type=quot;text/cssquot; href=“stylesheets/ie.cssquot; />
<![endif]-->
</head>

If document is Quirks / IE7 Standards:
<head>
<title>Test Page</title>
/* non-standard content: pass all versions of Internet Explorer fix-ups */
<!--[if gte IE 7]>
<link rel=quot;stylesheetquot; type=quot;text/cssquot; href=“stylesheets/ie.cssquot; />
<![endif]-->
</head>
Interoperability

Compatibility

New scenarios
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market
     conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.
                                 MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Advanced Cross-Browser Layout with Internet Explorer 8

More Related Content

Similar to Advanced Cross-Browser Layout with Internet Explorer 8

Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8Lachlan Hardy
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsAviran Cohen
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture TrendsSrini Penchikala
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Sarah Dutkiewicz
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008Association Paris-Web
 
Java ide comparision
Java ide comparisionJava ide comparision
Java ide comparisionRaj
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2divzi1913
 
Struts2-Spring=Hibernate
Struts2-Spring=HibernateStruts2-Spring=Hibernate
Struts2-Spring=HibernateJay Shah
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate PackageSimon Collison
 
07 response-headers
07 response-headers07 response-headers
07 response-headershanichandra
 
深入淺出RoR
深入淺出RoR深入淺出RoR
深入淺出RoREric Lee
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-HibernateJay Shah
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowSpiffy
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SEdogangoko
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Eric Barroca
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Arun Gupta
 

Similar to Advanced Cross-Browser Layout with Internet Explorer 8 (20)

Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8Welcome to IE8 - Integrating Your Site With Internet Explorer 8
Welcome to IE8 - Integrating Your Site With Internet Explorer 8
 
ME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS FundamentalsME vs WEB - AngularJS Fundamentals
ME vs WEB - AngularJS Fundamentals
 
Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 
Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer Untying the Knots of Web Dev with Internet Explorer
Untying the Knots of Web Dev with Internet Explorer
 
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
IE 8 et les standards du Web - Chris Wilson - Paris Web 2008
 
Java ide comparision
Java ide comparisionJava ide comparision
Java ide comparision
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
Struts2-Spring=Hibernate
Struts2-Spring=HibernateStruts2-Spring=Hibernate
Struts2-Spring=Hibernate
 
Developing Your Ultimate Package
Developing Your Ultimate PackageDeveloping Your Ultimate Package
Developing Your Ultimate Package
 
07 response-headers
07 response-headers07 response-headers
07 response-headers
 
深入淺出RoR
深入淺出RoR深入淺出RoR
深入淺出RoR
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-Hibernate
 
Coding the UI
Coding the UICoding the UI
Coding the UI
 
Coding Ui
Coding UiCoding Ui
Coding Ui
 
Glass Fish Portfolio Web Server Cvr
Glass Fish Portfolio Web Server CvrGlass Fish Portfolio Web Server Cvr
Glass Fish Portfolio Web Server Cvr
 
JavaServer Pages
JavaServer PagesJavaServer Pages
JavaServer Pages
 
CTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should KnowCTU June 2011 - Things that Every ASP.NET Developer Should Know
CTU June 2011 - Things that Every ASP.NET Developer Should Know
 
New Features of Java7 SE
New Features of Java7 SENew Features of Java7 SE
New Features of Java7 SE
 
Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06Nuxeo Roadmap 2008/06
Nuxeo Roadmap 2008/06
 
Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011Java EE 6 workshop at Dallas Tech Fest 2011
Java EE 6 workshop at Dallas Tech Fest 2011
 

More from goodfriday

Narine Presentations 20051021 134052
Narine Presentations 20051021 134052Narine Presentations 20051021 134052
Narine Presentations 20051021 134052goodfriday
 
09 03 22 easter
09 03 22 easter09 03 22 easter
09 03 22 eastergoodfriday
 
Holy Week Easter 2009
Holy Week Easter 2009Holy Week Easter 2009
Holy Week Easter 2009goodfriday
 
Holt Park Easter 09 Swim
Holt Park Easter 09 SwimHolt Park Easter 09 Swim
Holt Park Easter 09 Swimgoodfriday
 
Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092goodfriday
 
Eastercard2009
Eastercard2009Eastercard2009
Eastercard2009goodfriday
 
Easterservices2009
Easterservices2009Easterservices2009
Easterservices2009goodfriday
 
Bulletin Current
Bulletin CurrentBulletin Current
Bulletin Currentgoodfriday
 
March 2009 Newsletter
March 2009 NewsletterMarch 2009 Newsletter
March 2009 Newslettergoodfriday
 
Lent Easter 2009
Lent Easter 2009Lent Easter 2009
Lent Easter 2009goodfriday
 
Easterpowersports09
Easterpowersports09Easterpowersports09
Easterpowersports09goodfriday
 
Easter Trading 09
Easter Trading 09Easter Trading 09
Easter Trading 09goodfriday
 
Easter Brochure 2009
Easter Brochure 2009Easter Brochure 2009
Easter Brochure 2009goodfriday
 
March April 2009 Calendar
March April 2009 CalendarMarch April 2009 Calendar
March April 2009 Calendargoodfriday
 

More from goodfriday (20)

Narine Presentations 20051021 134052
Narine Presentations 20051021 134052Narine Presentations 20051021 134052
Narine Presentations 20051021 134052
 
Triunemar05
Triunemar05Triunemar05
Triunemar05
 
09 03 22 easter
09 03 22 easter09 03 22 easter
09 03 22 easter
 
Holy Week Easter 2009
Holy Week Easter 2009Holy Week Easter 2009
Holy Week Easter 2009
 
Holt Park Easter 09 Swim
Holt Park Easter 09 SwimHolt Park Easter 09 Swim
Holt Park Easter 09 Swim
 
Easter Letter
Easter LetterEaster Letter
Easter Letter
 
April2009
April2009April2009
April2009
 
Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092Swarthmore Lentbrochure20092
Swarthmore Lentbrochure20092
 
Eastercard2009
Eastercard2009Eastercard2009
Eastercard2009
 
Easterservices2009
Easterservices2009Easterservices2009
Easterservices2009
 
Bulletin Current
Bulletin CurrentBulletin Current
Bulletin Current
 
Easter2009
Easter2009Easter2009
Easter2009
 
Bulletin
BulletinBulletin
Bulletin
 
March 2009 Newsletter
March 2009 NewsletterMarch 2009 Newsletter
March 2009 Newsletter
 
Mar 29 2009
Mar 29 2009Mar 29 2009
Mar 29 2009
 
Lent Easter 2009
Lent Easter 2009Lent Easter 2009
Lent Easter 2009
 
Easterpowersports09
Easterpowersports09Easterpowersports09
Easterpowersports09
 
Easter Trading 09
Easter Trading 09Easter Trading 09
Easter Trading 09
 
Easter Brochure 2009
Easter Brochure 2009Easter Brochure 2009
Easter Brochure 2009
 
March April 2009 Calendar
March April 2009 CalendarMarch April 2009 Calendar
March April 2009 Calendar
 

Recently uploaded

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Advanced Cross-Browser Layout with Internet Explorer 8

  • 1.
  • 2. Goal is predictability across browsers All content is standards compliant Pre-standards Present
  • 3.
  • 4. Session Objective(s): Discuss the new layout engine and its capabilities Explain the strategy for improved standards compliance in IE8 layout Introduce version targeting and how it may be used to maintain site compatibility Key Takeaway – Understand how Internet Explorer 8 is delivering improved standards compliance and what this means for your web site now and in the future
  • 5. • Great typographic foundation New • Designed with CSS 2.1 Layout Engine spec in hand • Deprecation of hasLayout MSHTML
  • 6. Tenet #1 – Better support for web standards MODES IE 8 • CSS 2.1 layout + Javascript / OM improvements IE8 Layout
  • 7. Goal = CSS 2.1 compliance Great progress to date: ACID2 displays correctly Additional Resources Video Blog post
  • 8.
  • 9. 9.3.1 Choosing a positioning scheme: 'position' property Path to CSS 2.1 compliancethe normal flow (this is not crystal The box's position is calculated according to clear position in normal flow). Then the box is offset relative to its called the normal position. When a box B is relatively positioned, the position of the followingof test suite though B were not offset. The effect Lack box is calculated as of 'position:relative' on table-row-group, table-header-group, table- Contributing tests to the W3C footer-group, table-row, table-column-group, table-column, table-cell, and Areas of elements is undefined. table-caption ambiguity in spec Driving principle = Interoperability Follow the spec to the letter For areas of ambiguity, seek clarification from the working group Compare browsers and propose common ground Propose solution that is in line with the intent of the spec
  • 10.
  • 11. Enable new Enable new experiences experiences Existing sites just work Existing sites just work
  • 12. Tenet #2 – Allow developers to choose IE7 compatibility mode if they want / need it MODES IE <= 6 IE 7 • Quirks mode • Standards mode IE7 Layout* *Security fixes made to IE7 layout code path may cause changes in behavior from IE7 to IE8
  • 13.
  • 14. Multiple layout modes provide support for Quirks, Standards, and IE8 Standards modes MODES IE <= 6 IE 7 IE 8 • Quirks mode • Standards mode • CSS 2.1 rendering + Javascript / OM Mode must be improvements enabled via opt-in IE7 Layout IE8 Layout Default = best standards mode
  • 15. Common Name Compatibility Mode Declared <META> Value overrides Quirks IE=5 <!DOCTYPE> IE7 Standards IE=7 Compatibility mode switch can “lock-in” IE8 Standards IE=8 Quirks and IE7 Always Use Latest IE=edge Standards modes as Mode well <script type=quot;text/javascriptquot;> // What mode is my document in? document.write(quot;My document is in IEquot; + document.documentMode + quot; compatibility modequot;); </script>
  • 16. Opt-in via <META> tag or HTTP header <!DOCTYPE html PUBLIC quot;-//W3C//DTD XHTML 1.0 Strict//ENquot; quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtdquot;> <html xmlns:web xmlns=quot;http://www.w3.org/1999/xhtmlquot; lang=quot;enquot; xml:lang=quot;enquot; class=quot;liveApp la_en lo_us IE IE_8quot;> <head> <title>Test Page</title> <meta http-equiv=“X-UA-Compatible” content=“IE=8” /> <meta http-equiv=quot;Content-Typequot; content=quot;text/html; charset=utf-8quot; /> <meta name=quot;descriptionquot; content=quot;Find exactly what you are looking for – FAST!quot; /> <meta name=quot;ROBOTSquot; content=quot;NOODPquot; /> <link rel=quot;stylesheetquot; type=quot;text/cssquot; ref=quot;stylesheets/standards.cssquot; /> </head>
  • 17.
  • 18. Call to action: update User-Agent string sniffing User-Agent Sniffing Incorrect: if ( ver > -1 ) { if ( ver == 7.0 ) msg = quot;You're using a recent copy of Internet Explorer.quot; else msg = quot;You should upgrade your copy of Internet Explorer.quot;; } Correct: if ( ver > -1 ) { if ( ver >= 7.0 ) msg = quot;You're using a recent copy of Internet Explorer.quot; else msg = quot;You should upgrade your copy of Internet Explorer.quot;; }
  • 19. Call to action: update conditional comment blocks Conditional Comments If document is IE8 Standards: <head> <title>Test Page</title> /* pass down-level browsers style fix-ups */ <!--[if lte IE 7]> <link rel=quot;stylesheetquot; type=quot;text/cssquot; href=“stylesheets/ie.cssquot; /> <![endif]--> </head> If document is Quirks / IE7 Standards: <head> <title>Test Page</title> /* non-standard content: pass all versions of Internet Explorer fix-ups */ <!--[if gte IE 7]> <link rel=quot;stylesheetquot; type=quot;text/cssquot; href=“stylesheets/ie.cssquot; /> <![endif]--> </head>
  • 20.
  • 22. © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.