The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

replacement for :before and :after for ie6????

  • # August 18, 2008 at 10:19 am


    I have to print the line numbers in all the printable reports which are basically tables.
    I first thought of using :before in conjunction with the "counter" and "content" property to insert the line number before each row. But this does not work on ie6 as :before and :after are not compatible with ie6. Can you suggest me any different way?
    I also tried to add column column that will have the line number. But this is really tedious as the number of printable reports is really huge. By using CSS, I’ll be able to show the line numbers by just including a single file in each report.
    Also if I can display the text on the web page through CSS, the problem can be solved. Is there any IE6 compatible way to do the same?
    Waiting for your response.


    # August 18, 2008 at 5:02 pm

    if i were you i would use jQuery to do something like this, that does require javascript to be enabled though
    the code using jQuery would look something like this:

    $(‘element you want to be selected’).next()…stuffHere

    jQuery supports selecting the next tag the previous tag the first tag and much more, a full list of supported selectors can be found here

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed