CSS interfering with my donation box.

Discussion in 'CSS' started by VistaXP, May 9, 2006.

  1. #1
    So this is the script for the donation box.

    <script src="http://donatemeter.com/showbutton.php?i=281&item=27&width=170&direction=vertical&showtop5=yes&background=0072BC&graph1=red&graph2=maroon&text=white">

    See background color is 0072BC (Blue), text is white etc.

    But this part of my css:

    table {background-color: #363636;}
    th {background-color: #E1E1E1; font-size: 11pt;}
    td {background-color: #FFF; font-size: 10pt;}
    Code (markup):
    Is changing the design. How do I keep it blue background and white text.

    This is what happens when the above css is there: http://openlite.5gigs.com/indextest.html
    See how it changes the color to white and black.

    Then when the above css is removed:
    http://openlite.5gigs.com/indexnumber2.html

    So, how do I make it look like that blue donation box with white text without removing the code above. I've tried adding a div and style for the donation box, but that doesn't seem to override the above css.

    CSS: http://pastebin.com/703726
     
    VistaXP, May 9, 2006 IP
  2. johneva

    johneva Well-Known Member

    Messages:
    1,480
    Likes Received:
    46
    Best Answers:
    1
    Trophy Points:
    170
    #2
    Apply the CSS properties with a class instead of direct to the table,th and td.

    It may be easyer to do it the other way around though and give the donation box styles a class it depends how the javascript has been coded for the donation box.

    Otherwise it would mean going though and adding a class attribute to each of your table,th and td tags which would be a lot of work looking at your coding for the page, then you also have all your other pages unless you make a seperate CSS file for just this page.
     
    johneva, May 9, 2006 IP
  3. VistaXP

    VistaXP Guest

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks johneva but i tried that and it didin't work, you think you can give an example of what it should look like.
     
    VistaXP, May 9, 2006 IP
  4. johneva

    johneva Well-Known Member

    Messages:
    1,480
    Likes Received:
    46
    Best Answers:
    1
    Trophy Points:
    170
    #4
    Yeah heres a quick example to show ya how a class works.

    CSS
    
    .ta {background-color: #363636;}
    .thead {background-color: #E1E1E1; font-size: 11pt;}
    .cell {background-color: #FFF; font-size: 10pt;}
    
    Code (markup):
    HTML
    
    <table class="ta">
     <tr>
       <th class="thead" colspan="2">This would be in the header cell</th>
     </tr>
     <tr>
       <td class="cell">This would be text in a cell on the next row</td>
       <td class="cell">This would be text in a cell on the next row</td>
     </tr>
    <table>
    
    Code (markup):
     
    johneva, May 9, 2006 IP
  5. bullfrog

    bullfrog Guest

    Messages:
    47
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5

    Have you tried enclosing the script within a div tag and specify the same background as chosen in the script. This would be a quick workaround.
     
    bullfrog, May 9, 2006 IP