Index of

edited November 2007 in
How would you create a generic style for "index of" type web pages.
Something like the FTP: File: styles.



  • You could use a selector like

    body > h1:first-child + pre

    It may match other things, but it's not likely.
  • Jason's suggestion would somewhat work, but it would only allow you to style the parts after the big H1 header element. If you wanted to change the background color, you're out of luck because there's nothing unique you can go by to select the BODY element. Your best option is probably to make a greasemonkey script and test to see if the TITLE element's text starts with "Index of", and perhaps test for a few other unique elements that these types of pages contain. After that you can insert some new CSS to style the page.
  • edited November 2007
    When I looked at earlier this week, the two scripts relevant to Apache generated indices did not work. They've both aged, though I assume they worked for someone (at least the author, right?) They were both varied attempts at what Valacar has suggested here, and he's right; there's not enough specificity on such a page to build a CSS rule-set alone.

    Did not work at all:

    Sort of worked, and is probably the one to fix:
Sign In or Register to comment.