inherit
192592
0
Apr 1, 2014 7:53:33 GMT -8
superman7515
17
April 2013
superman7515
|
Post by superman7515 on Nov 8, 2013 19:39:16 GMT -8
So I run a college sports forum (www.fightinbluehens.proboards.com) and I'd like to show the league standings for each sport at the top of that sports respective page. I imagine I could do this by inserting something into the header for those areas, and when I couldn't find a plug-in for the headers that would do what I was looking for, decided to just make a basic table in the header of each page (they all have to be different since the standings in football aren't the same as in men's basketball/women's basketball/soccer etc etc etc). So I came up with something pretty simple and wanted to import it into my men's basketball header...
<html> <head> <style> table, td, th { border:1px solid blue; } td { background-color:yellow; text-align:center; color:blue; } th { background-color:blue; color:yellow; } </style> </head> <body> <table> <tr> <th>School</th> <th>Conference</th> <th>Win Pct. </th> <th>Overall</th> <th>Win Pct. </th> <th>Games Back</th> </tr> <tr> <td>Towson</td> <td>0-0</td> <td>0.000</td> <td>1-0</td> <td>1.000</td> <td>---</td> </tr> </table> </body> </html>
But when I tried that, it changed the background of everything after the header. Everything that is white on this page (fightinbluehens.proboards.com/board/13/fightin-blue-hens-mens-basketball) turns yellow and all of the threads have a 1 px solid blue border around them (each section has a border; Subject, Created By, Ratings, Replies, Views, and Last Post). So something isn't ending where it looks like it should. I'm sure it's something small, but looking over that little bit, I don't see where I missed closing something.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Nov 8, 2013 21:34:08 GMT -8
If you give me a sec, I can redo that for you. I saw your other thread and started working on something for you but never finished. You can see it here on my test site. putteraround10.freeforums.net/board/4/hidden-picture-boardI only have three columns and exclusively use div's but let me take yours and fix it up for you. Edit: Here is yours fixed up a bit. (I removed some parts you don't want to use such as <html><body> and such. You should also change those named colors to hexadecimal colors but I imagine you are just testing things right now and know that. <style> .my_stats table,.my_stats td,.my_stats th{ border:1px solid blue; padding:2px; } .my stats td{ background-color:yellow; text-align:center; color:blue; } .my stats th background-color:blue; color:yellow; } </style>
<div class="my_stats"> <table> <tbody> <tr> <th>School</th> <th>Conference</th> <th>Win Pct. </th> <th>Overall</th> <th>Win Pct. </th> <th>Games Back</th> </tr> <tr> <td>Towson</td> <td>0-0</td> <td>0.000</td> <td>1-0</td> <td>1.000</td> <td>---</td> </tr> </tbody> </table> </div>
|
|
inherit
192592
0
Apr 1, 2014 7:53:33 GMT -8
superman7515
17
April 2013
superman7515
|
Post by superman7515 on Nov 9, 2013 8:57:15 GMT -8
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Nov 9, 2013 14:34:05 GMT -8
You need to use the pound sign before your hex color and I made a mistake as well. Somehow the _between my class names wasn't on the .my_stas td and.my_stats th. Try this:
<style> .my_stats table,.my_stats td,.my_stats th{ border:1px;padding:2px; } .my_stats td{ background-color:#F9D616; text-align:center; color:#00539F; } .my_stats th{ background-color:#00539F; text-align:center; color:#F9D616; } </style>
|
|
inherit
192592
0
Apr 1, 2014 7:53:33 GMT -8
superman7515
17
April 2013
superman7515
|
Post by superman7515 on Nov 9, 2013 17:18:08 GMT -8
Awesome. Thanks Tumbleweed, adding the "_" made all the difference. Much appreciated.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Nov 9, 2013 18:51:39 GMT -8
You're welcome and sorry about my goof.
|
|
inherit
192592
0
Apr 1, 2014 7:53:33 GMT -8
superman7515
17
April 2013
superman7515
|
Post by superman7515 on Nov 21, 2013 10:46:32 GMT -8
Hey Tumbleweed, sorry to be a pain all this time later, but I've been playing around with the table and I can't figure out if something is possible or not. I wanted to give each line of the table a different background and text color. For example, for School A, the team colors are green & yellow, so a green background with yellow letters. For School B, the team colors are blue & red, so a blue background with red letters. I tried making it ".my_stats td1", ".my_stats td2", etc and then using <td1>, <td2>, etc but that didn't work out. Any suggestions on if this is possible? Secondly, I tried using <align center> in a few different places to try to get the entire table centered on the forum page, but it never moved from being aligned on the right side of the page as it is now. Is there someplace I can insert that and get the table to move to the center? Thank you in advance for any info you can give one way or the other.
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Nov 21, 2013 15:25:26 GMT -8
You can just use center tags:
<center> table here </center>
To change the colors you can just add your style right to the tag:
<th style="background-color: #ddddcc;color: red;">School</th>
|
|