3 replies [Last post]
duckxtales
Offline
Regular
Last seen: 3 years 44 weeks ago
Timezone: GMT-5
Joined: 2007-05-15
Posts: 27
Points: 0

Hi,

I just noticed that the first-child pseudo class does not work on A tag links. Does anyone have a work around for this?

I found an awesome script for enabling :hover and :first-child on ie6 without the use of javascript, its all done in the stylesheet.

http://elmicoxcodes.blogspot.com/2008/03/new-way-to-hover-and-first-child-in-ie6.html

It makes the page lag a bit, but give you more semantic html structure without having to declare classes for first or last elements.

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 2 days 20 hours ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5342
Points: 2963

Hi duckxtales, Can you give

Hi duckxtales,
Can you give some more info on what you are trying to do.

That script still uses JavaScript it just puts it in an expression in the stylesheet instead of in a javaScript file. It would be interesting to check out performance differences with each method.

duckxtales
Offline
Regular
Last seen: 3 years 44 weeks ago
Timezone: GMT-5
Joined: 2007-05-15
Posts: 27
Points: 0

Attached is the file... no

Attached is the file... no images attached tho, but thats not needed.

In the middle column where it says:

Dora Backpack (line 383)

It is a link element with display block and the border-top is 1px. I want to target this with :first-child and disable the border top.

I'm curious what editor do you use? e here.

AttachmentSize
new.html 19.43 KB
duckxtales
Offline
Regular
Last seen: 3 years 44 weeks ago
Timezone: GMT-5
Joined: 2007-05-15
Posts: 27
Points: 0

bumpy

bumpy