Można używać przeglądarki Internet Explorer wyrażeń CSS w połączeniu z bezpiecznym podkreślenia ("_", IE6 i wcześniejszych) CSS Hack:
/* Adds dotted bottom border to `<ABBR>` with a `title` attribute. */
abbr {
_border-bottom: expression(this.title ? '1px dotted' : 'none');
}
abbr[title] {
border-bottom: 1px dotted;
}
Rozumiem, że prosiłem o "ważnej" CSS, ale jeśli zhakujesz CSS powyżej, to przeczytaj o Safe CSS Hacks.
Powyższe może zostać zmienione na:
.ie6 abbr {
_border-bottom: expression(this.title ? '1px dotted' : 'none');
}
abbr[title] {
border-bottom: 1px dotted;
}
To, czy HTML rozpoczął jako:
<!--[if lt IE 7]><html class="ie6"><![endif]-->
<!--[if IE 7]> <html class="ie7"><![endif]-->
<!--[if IE 8]> <html class="ie8"><![endif]-->
<!--[if gt IE 8]><!--><html><!--<![endif]-->
jest poprawny html? –
Ngm
@ngm nie, zduplikowane specyfikacje atrybutów są niedozwolone –
@ngm można jednak użyć class = "foo bar" – Dels