20
CSS & Troubleshooting IE6 KIMBERLY BLESSING W EB DEVELOPER & MANAGER COMCAST INTERACTIVE MEDIA PHILADELPHIA, PA July 18, 2009 The CSS Summit

CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

CSS & Troubleshooting IE6g

KIMBERLY BLESSINGW E B D E V E L O P E R & M A N A G E RC O M C A S T I N T E R A C T I V E M E D I A

P H I L A D E L P H I A , P A

July 18, 2009The CSS Summit

Page 2: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

“Like Netscape 4 in 2000, IE6 is p 4 ,perceived to be holding back the web.”

- Jeffrey Zeldmanff y

=

Page 3: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Why users couldn’t (and still can’t) upgrade

Corporate and government systems are locked down p g yto prevent upgrades or new installs

Old operating systems on old hardware may not have p g y ybetter upgrade options, or may just be so buggy that software won’t install

Some users are just uncomfortable with switching or upgrading their browser without a lot of hand-h ldiholding

Page 4: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

IE6 Weekday vs. Weekend UsageBy the numbers…

IE6 Weekday vs. Weekend Usage

• OmnitureSiteCatalystcurrently reports

%19.4%

• Net Applications Market Share Market Share reported 16.94% for May 2009May 2009

M-F Sa SuM F Sa, Su

Page 5: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Support?!?pp

Page 6: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Support?!?

“SUPPORT DOES NOT MEAN

pp

“SUPPORT DOES NOT MEAN THAT EVERYBODY GETS

THE SAME THING ” THE SAME THING. Yahoo! graded browser support

http://developer.yahoo.com/yui/articles/gbs/

Page 7: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Tricking users? Not a good idea.

http://www ie6update com/http://www.ie6update.com/

Page 8: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Adding an anti-IE6 badge to your site? No.

http://www.bringdownie6.com/

Page 9: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Giving users a bare-bones experience? Nah.

http://www.forabeautifulweb.com/blog/about/universal_internet_explorer_6_css/

Page 10: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

What do the big sites do?

Y h ! D li l f IE6Yahoo! Delivers an alternate page for IE6.

AOL Aims for the same experience in IE6: Uses server-side scripts to add browser-specific class names in the markup, which trigger CSS rules with the browser specific selectorsrules with the browser-specific selectors.

MSN Aims for the same experience in IE6: Uses conditional comments to load an IE style sheet as well as an IE6-specific style sheet.

CNN Aims for the same e perience in IE6 Calls the same CSS files for CNN Aims for the same experience in IE6: Calls the same CSS files for all browsers but targets IE6 with the * html hack.

Apple Aims for the same experience in IE6: Calls the same CSS files for all browsers but targets IE6 with the property hackall browsers but targets IE6 with the _property hack.

Get Firefox Delivers an alternate page for IE6.

*Note: Only home pages were reviewed. Other pages in these sites may vary.

Page 11: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

EOL messaging is becoming more popular

Page 12: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

T t d To create a good user experience in IE6:

Determine what level of support you are going to give

p

1. Determine what level of support you are going to give.

2. Decide which factors will influence when support for IE6 will endIE6 will end.

3. Document a technical strategy: cover coding techniques for IE6 now and the process for removing code after p gyou no longer support it.

4. Inform the user before and after things change!

Page 13: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

T t d To create a good user experience in IE6:

Determine what level of support you are going to give

p

1. Determine what level of support you are going to give.

2. Decide which factors will influence when support for IE6 will endIE6 will end.

3. Document a technical strategy: cover coding techniques for IE6 now, and the process for removing code after f , p f g fyou no longer support it.

4. Inform the user before and after things change!

Page 14: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

CSS coding approaches for IE6

Conditional comments to ll ifi l h

Conditional comments to ll ifi l h

Hacks added in to existing l h

Hacks added in to existing l hcall IE-specific style sheetcall IE-specific style sheet style sheetstyle sheet

Ensures IE-only delivery No extra HTTP request

Requires an extra HTTP request

CSS will probably not validate

All CSS should still validate

M b diffi l

Fairly well tested, reliable

Code may get messy, if not d May be difficult to manage

on a large sitemanaged

Page 15: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

CSS coding approaches for IE6

Conditional comments to ll ifi l h

Conditional comments to ll ifi l h

Hacks added in to existing l h

Hacks added in to existing l hcall IE-specific style sheetcall IE-specific style sheet style sheetstyle sheet

Example: Single declaration hacks:<!--[if lt IE 7]><link rel="stylesheet" ><![endif]-->

selector {property: value;*property: value;property: value;

Specify the version:[if IE] or [if IE#]

#

_p p y ;}

Separate rules:selector { }[if lt IE#]

[if lte IE#]

selector {...}html>body selector {...}

* html {}

Page 16: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

To fix float-clearing overflow:Most common IE6 CSS fixes

To fix float-clearing overflow:height: 1%

To fix margins on floats with

You just might get used to typing these

To fix margins on floats with margins > 0:display: inline

automatically…

Read more at

To fix layering issues triggered by use of relative positioning:

i i iRead more at

Position is Everythinghttp://www.positioniseverything.net/

position: static

To add layout to an element that d ’t h l t

p // p y g /

doesn’t have layout:zoom: 1

Page 17: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

Fixing IE6 with JavaScript

Dean Edwards’ IE-77Adds selector support, box model and overflow fixes, PNG alpha transparency, and more

Insert this code:<!--[if lt IE 7]><script type="text/javascript" src="http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE7.js"></script><![endif]-->

More information: http://code.google.com/p/ie7-js/

Page 18: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

IE Developer Toolbar

http://www.microsoft.com/downloads/details.aspx?FamilyID=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en

Page 19: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

“Like Netscape 4 in 2000, IE6 is p 4 ,perceived to be holding back the web.”

- Jeffrey Zeldman

W I T H T H E S E T I P S

ff y

W I T H T H E S E T I P S ,I H O P E T H A T I E 6 N O L O N G E R

H O L D S Y O U B A C K F R O M C R E A T I N GG R E A T W E B S I T E S .

Page 20: CSS Troubleshooting IE6presentations.kimberlyblessing.com/2009/CSS_Summit/Troubleshoot… · CSS & Troubleshooting IE6 KIMBERLY BLESSING WEB DEVELOPER & MANAGER COMCAST INTERACTIVE

CSS & Troubleshooting IE6g

KIMBERLY BLESSING@ O B I W A N K I M B E R L Y

W W W . K I M B E R L Y B L E S S I N G . C O MK I M B E R L Y @ K I M B E R L Y B L E S S I N G . C O M

T H E C I R C L E O F S T A N D A R D SW W W . T H E C I R C L E O F S T A N D A R D S . C O M

July 18, 2009The CSS Summit