Click a question, and
the answer will be revealed, as shown in Figure 8-3. Internet Explorer (IE) 6 users will not see
any change, but getting that problematic browser on track isn??™t too difficult and is covered in
the sidebar.
Figure 8-3. FAQ using :target shows the question you clicked in the open position.
CHAPTER 8 n CASE STUDY: FAQ FACELIFT 171
FIXING IE 6
Suckerfish Shoal (http://tmldog.com/articles/suckerfish/shoal/, by Patrick Griffiths and Dan
Webb) and Dean Edwards??™ IE 7 scripts (http://dean.edwards.name/IE7/) will both enable IE 6 to apply
target styles. If you have to overcome a lot of the IE 6 CSS and HTML shortcomings, the IE 7 scripts are my
recommendation because they require no modifications to your style sheets to work.
It is recommended that you apply either fix by using conditional comments to avoid burdening more
standards-compliant browsers with the extra download(s):
This conditional comment serves ie8-core.js and ie8-css3-selectors.js to users of IE 6 and
below.
Browsers that don??™t understand CSS get a nice listing of the questions and answers, with
all the benefits of nice semantic markup, as seen in Figure 8-4.
Figure 8-4. No CSS support, no problem.
With the CSS-based interaction complete, you can move on to the really exciting bit: the
JavaScript.
Pages:
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245