Professional Documents
Culture Documents
Lead Designer
@esamek
2
has to support it
Pro-actively NOT support IE6 - FUN! Pro-actively support IE6 - NOT FUN!
10
11
12
13
14
Quite frustrating
15
16
17
Typically requires Admin access IT departments frown on it User has to install, could harm
conversion rate
18
19
20
Add JavaScript
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script> <style> /* CSS rules to use for styling the overlay: .chromeFrameOverlayContent .chromeFrameOverlayContent iframe .chromeFrameOverlayCloseBar .chromeFrameOverlayUnderlay */ </style> <script> // You may want to place these lines inside an onload handler CFInstall.check({ mode: "overlay", destination: "http://www.waikiki.com" }); </script>
21
22
23
5. Kill/Crash IE6
http://www.catswhocode.com/blog/6-html-and-javascript-codes-to-crash-ie6
24
25
Always ask yourself if this will work in IE6 There is always a way to fix IE6 display
issues
27
Graceful Degradation
<script type="text/javascript" src="/menu.js"></script> <noscript> <ul id="menu"> <li><a href="/">Home</a></li> <li><a href="/products/">Products</a></li> <li><a href="/services/">Services</a></li> </ul> </noscript>
28
Progressive Enhancement
29
<!--[if IE]> According to the conditional <![endif]--> <!--[if IE 6]> According to the conditional <![endif]--> <!--[if IE 7]> According to the conditional <![endif]--> <!--[if IE 8]> According to the conditional <![endif]--> <!--[if IE 9]> According to the conditional <![endif]--> <!--[if gte IE 8]> According to the conditional higher<br /> <![endif]--> <!--[if lt IE 9]> According to the conditional 9<br /> <![endif]--> <!--[if lte IE 7]> According to the conditional equal to 7<br /> <![endif]--> <!--[if gt IE 6]> According to the conditional than 6<br /> <![endif]--> <!--[if !IE]> --> According to the conditional <!-- <![endif]-->
comment this is IE 8 or
30
<link rel="stylesheet" type="text/css" href="css/style.css" />! ! <!--[if IE]> ! <link rel="stylesheet" type="text/css" href="css/ie.css" media="all" /> ! <![endif]--> ! <!--[if IE 7]> ! <link rel="stylesheet" type="text/css" href="css/ie7.css" media="all" /> ! <![endif]--> ! <!--[if IE 6]> ! <link rel="stylesheet" type="text/css" href="css/ie6.css" media="all" /> ! <![endif]-->
31
32
/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { ! margin: 0; ! padding: 0; ! border: 0; ! font-size: 100%; ! font: inherit; ! vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { ! display: block; } body { ! line-height: 1; } ol, ul { ! list-style: none; } blockquote, q { ! quotes: none; } blockquote:before, blockquote:after, q:before, q:after { ! content: ''; ! content: none; } table { ! border-collapse: collapse; ! border-spacing: 0; }
33
Cascade styles, dont use hacks Cleaner code Its called CSS for a reason!
34
Find affected element Copy element selector Paste into IE CSS Change relevant styles
IN STYLE.CSS (Base Style) #content .sidebar .nav {box-shadow: 0 0 3px #444;border:none;} IN IE6.CSS (IE Fix Style) #content .sidebar .nav {border:2px solid #444;}
35
36
37
38
39
Slow
40
41
42
43
hasLayout
44
hasLayout Bug
Often a lack of dimensions applied You can see whether an element hasLayout in the IE Developer
Toolbar
45
not <div>!
46
float: left|right display: inline-block width: any value other than 'auto' height: any value other than 'auto' zoom: any value other than 'normal' (MSDN) writing-mode: tb-rl (MSDN)
47
.content.main-content
.link[src=*.jpg] div:hover
Web Fonts
49
50
CSS Expressions
Javascript within CSS Evaluates JS available properties to return a value to apply via CSS Only in IEs
height: expression( this.scrollHeight > 332 ? "333px" : "auto" ); /* sets max-height for IE */
51
52
Transparency
53
Transparency Fixes
Just use GIF or PNG8 with proper matte Use AlphaImageLoader - performance loss,
messes with DOM, no repeats or positioning of background IMGs - invalid CSS
Lots of other proprietary PNG fixers out there Best solution (best looking) is PNG8s with careful
graphic creation practices
54
55
Web Fonts
Just disable with conditional comments Windows does not have a good track
record of font smoothing/anti-aliasing
56
57
58
IE Transparency
filter: Alpha(Opacity=80);
59
IE Blur
progid:DXImageTransform.Microsoft.MotionBlur(strength=13, direction=310) progid:DXImageTransform.Microsoft.Blur(pixelradius=2)
60
IE Glow
FILTER: Glow(Color=#ff0000, Strength=8);
61
IE Flip
FILTER: FlipV; FILTER: FlipH;
62
IE Gradients
filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#FFFFFF', EndColorStr='#000000);
63