Selector error????

edited March 2008 in Stylish
I'm having issues selecting certain tables. Previewing the style works properly. But when I save the style it doesn't work right. There's three sibling tables, and I want to hide the first & last. While using :first-child successfully selects the first table, :last-child selects both remaining sibling tables. Either the problem is with DOM Inspector saying the three tables are siblings or the issue is with Stylish. Anyways, the site is http://www.topwebgames.com/in.asp?id=2955

Successfully select the first table:
@-moz-document url-prefix(http://www.topwebgames.com/in.asp?) { HTML > BODY > CENTER > TABLE:first-child {display:none !important;} }

Selects all three tables, not just the first & last:
@-moz-document url-prefix(http://www.topwebgames.com/in.asp?) { HTML > BODY > CENTER > TABLE:first-child, HTML > BODY > CENTER > TABLE::last-child {display:none !important;} }

Comments

  • edited March 2008
    Disregard.
  • edited March 2008
    i believe thats a bug in ff2 fixed in ff3 (i think it has something to do with how tables are loaded but don't quote me)

    edit: hows this work for you?
    @namespace url(http://www.w3.org/1999/xhtml); @-moz-document url-prefix(http://www.topwebgames.com/in.asp?){ body>center>table[width="100%"], body>center>table[width="750"]+br+br+br+br+br+br+br+table {display:none!important} }
  • Your style works perfectly, I wouldn't have though of using the BR's to select it. Thanks :)
    So you think the issue is in FF2? That would explain the strange behavior. Jason should login to confirm this :P

    btw, how do I link usernames & styles on this forum? I recall there was a method, but can't remember.
  • So you think the issue is in FF2? That would explain the strange behavior. Jason should login to confirm this :P
    i believe there was a mention of the bug in the forums, you can try searching if your bored
    btw, how do I link usernames & styles on this forum? I recall there was a method, but can't remember.
    you mean this?
    http://userstyles.org/forum/comments.php?DiscussionID=558
  • Naw, I seem to recall something like # ChoGGi would auto link your profile & #id123456 would link a style. But I might be remembering wrong lol
  • Your case is EXACTLY what I was talking about in http://userstyles.org/forum/comments.php?DiscussionID=975
    last-child selects last element while page hasn't been completely loaded, and later it turns out that selected element wasn't actually the last one.
  • Naw, I seem to recall something like # ChoGGi would auto link your profile & #id123456 would link a style. But I might be remembering wrong lol
    from when you add a new style?
  • It has nothing to do with styles or stylish, just this board. I'm pretty sure I'm just remembering things wrong now lol

    So, what are all the current forum codes besides basic html &
  • edited March 2008
    well there is an option just like that:
    You can link to other styles or users by referencing the ID at the end of its URL ("I like style 1 by user 1" becomes "I like Slashdot ad removal by Jason Barnabe (np)").

    the forums use this addon for vanilla, according to the default settings it allows
    a, img, font, b, i, u, s, strong, code, li, ul, ol, center, and abbr.
  • edited March 2008
    test:
    I like style 1 by user 1
    I like style1 by user1

    Doesn't work for me :(
  • its just for the style description
Sign In or Register to comment.