Google

Kategorie

Reprezentacja Wiedzy

Kalendarz

July 2007
M T W T F S S
« Jun   Aug »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

CSS first-child w IE

July 13th, 2007 by prond

Selektory :first-child i :last-child są niezwykle przydatnymi elementami składni CSS. Niestety IEdynie słuszny nie potrafi ich obsługiwać. Jest jednak całkiem ciekawy ‘feature’ w IE - wyrażenia JavaScript w CSS. Właśnie wykorzystując JavaScript możemy osiągnąć efekt podobny do selektorów :first-child i :last-child.


Przykład:

    table tr:first-child
    {
        font-weight:bold;
    }
    table tr
    {
        font-weight:expression((!this.previousSibling) ? "bold" : "normal" );
    }

Można się pokusić o bardziej złożone style, jak tylko wyprodukuje coś takiego na pewno wrzucę link.

Posted in CSS |

2 Responses

  1. bielan Says:

    tak zeby byl jakis komentarz :)
    hej

  2. DVD Says:

    Szacuneczek…
    I dzięki za hak :)
    Działa super.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.