Results 1 to 2 of 2

Thread: firefox userstyle css help

  1. #1

    firefox userstyle css help

    I'm making a userstyle for an invision board for a specific gaming forum I visit. This will be used with firefox's stylish addon. I do not have access to any code on the server; only stuff on my end.

    Using firebug I copied these snippets out of the html to see the order of things:

    Code:
    body
    #ipbwrapper
    <div class="activeusers">
    <div class="row2">
    <table class="ipbtable" cellspacing="0">
    <tbody>
    <tr>
    
    body
    #ipbwrapper
    <div class="borderwrap">
    <table class="ipbtable" cellspacing="0">
    <tbody>
    <tr>
    The problem is that I want to style the tr's from each section differently but don't know how to be specific since they didn't name the tables differently.

    I tried stuff like body>#ipwrapper>div.borderwrap>table.ipbtable tr{code} and .activeusers row1+row2{code} and it didn't seem to have any effect.

    Am I screwed? There's these little red borders everywhere, and I only want them on the view topic page and view post page but not at footers just where the forum posts are. If there's more code needed let me know & I'll post it
    maybe coming back to linux soon! need new computer

  2. #2
    Join Date
    Apr 2007
    Beans
    Hidden!

    Re: firefox userstyle css help

    I think you could probably use something like this in order to access the tables (and change it with your custom CSS accordingly):

    PHP Code:
    <html>
      <
    head>
        <
    style type="text/css">
        .
    activeusers .ipbtable tr {
        
    colorblue;
        }    
        .
    borderwrap .ipbtable tr{
        
    colorgreen;
        }
        </
    style>
      </
    head>
      <
    body>
        <
    div class="activeusers">
        <
    div class="row2">
           <
    table class="ipbtable" cellspacing="0">
            <
    tr>
                <
    td>One</td>
                <
    td>Two</td>
            </
    tr>
            <
    tr>
                <
    td>Three</td>
                <
    td>Four</td>
            </
    tr>
          </
    table>
        <
    div class="borderwrap">
        <
    p>
          <
    table class="ipbtable" cellspacing="0">
            <
    tr>
                <
    td>One</td>
                <
    td>Two</td>
            </
    tr>
            <
    tr>
                <
    td>Three</td>
                <
    td>Four</td>
            </
    tr>
          </
    table>
      </
    body>
    </
    html
    Output is:
    -------------------------------------------
    One Two
    Three Four


    One Two
    Three Four

    -------------------------------------------

    For me it works also without mentioning the "tr" in the style definition - I guess the "tr" inherits some stuff from the upper class.
    Just my 0.05.
    Last edited by cdiem; July 20th, 2009 at 09:38 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •