Html(Table) help (in Off-topic)


Flamey February 21 2006 1:58 AM EST

right now i am running a lottery so i made a table that i found in another post and its pretty basic.

can some one tell me how to make it better(i.e. headings and stuff)

if you wanna see it here it is.

#2 Valiek
#5 Jokers2587
#7 skydemon
#8 Gilgamesh2090
#9 th00p
#13 (CB1)logan666
#17 Mikel
#18 JAFO
#20 Darkwalker
#21 Karmic Mishap
#23 Jokers2587
#24 Valiek
#30 Darkwalker
#31 Gilgamesh2090
#32 {cb1}smallpau1
#34 JAFO
#36 Gilgamesh2090
#37 Jokers2587
#42 Karmic Mishap
#45 skydemon
#49 [OB]ForgeBird

bartjan February 21 2006 2:08 AM EST

For headings, make the cells <th>, not <td>.

Flamey February 21 2006 2:23 AM EST

thanks for that bart.but is there anyway to making it better looking. i see the other tables, they have a background color(blue) and writing which is smaller(white).

how would i be able to do that?

Numbers Buyers
#2 Valiek
#5 Jokers2587
#7 skydemon
#8 Gilgamesh2090
#9 th00p
#13 (CB1)logan666
#17 Mikel
#18 JAFO
#20 Darkwalker
#21 Karmic Mishap
#23 Jokers2587
#24 Valiek
#30 Darkwalker
#31 Gilgamesh2090
#32 {cb1}smallpau1
#34 JAFO
#36 Gilgamesh2090
#37 Jokers2587
#42 Karmic Mishap
#45 skydemon
#49 [OB]ForgeBird

bartjan February 21 2006 2:30 AM EST

<td style="color:white;background-color:blue;font-size:smaller">

Flamey February 21 2006 2:48 AM EST

(the table below is me testing)ok thanks again,but why does the heading go to space next to it. and how do i change the color to a less hurtful one and what do i need to type for the other colors(other than the basic ones)

Tickets Tickets
#2 Valiek
#5 Jokers2587

bartjan February 21 2006 3:12 AM EST

<th><td style=color:white;background-color:red;font-size:smaller><b>Tickets</b>
<th><td style=color:white;background-color:blue;font-size:smaller><b>Tickets</b>

You were putting an (unclosed) TD within an (unclosed) TH tag. You'll want to use either a TD, or a TH, but not both. Also don't forget to close all your tags.

Most browsers operate on the "Garbage in, garbage out" principle, so that explains the odd output you got ;)

Stephen February 21 2006 3:28 AM EST

Most of the Internet operates on that principle

Sukotto [lookingglas] February 21 2006 3:47 PM EST

Be careful with colors. Not everyone uses the same theme as you and colors that look great to you could be terrible to someone else.

One thing you can do is to use the CSS (style codes) that Jon defined for the site and each theme uses. I suggest you start with the loser/winner/tie fonts.

Just add
class="loser-font"
class="winner-font"
class="tie-font"
To any of the tr or td tags in your table.

 

For example applying to rows.

winner-font foo you
loser-font
bar me
tie-font
baz sweet cheri

Which I got from the following
<table border="1" cellpadding="1" cellspacing="1" >
<tr class="winner-font">
<td>winner-font
</td>
<td>foo
</td>
<td>you
<br />
</td>
</tr>
<tr class="loser-font">
<td>loser-font
<br />
</td>
<td>bar
</td>
<td>me
<br />
</td>
</tr>
<tr class="tie-font">
<td>tie-font
<br />
</td>
<td>baz
</td>
<td>sweet cheri
<br />
</td>
</tr>
</table>

Note however, that some themes might assign the same colors to different styles... but at least you won't be driving people away by picking colors that don't work with their chosen theme.

bartjan February 21 2006 4:03 PM EST

I did specify a background color as well as a color in my example for a reason...

Sukotto [lookingglas] February 21 2006 6:47 PM EST

I just figured you wrote a little script to scan all css files associated with players to verify your color combinations would look ok before posting your example ;-) .

Flamey February 22 2006 12:44 AM EST

but winner and tie font are black, the same and loser is white.

looks like no difference with tie font and winner font

deifeln February 22 2006 12:47 AM EST

Flamey,

Try changing your theme.

Flamey February 22 2006 11:44 PM EST

hey bart i keep getting the same response when closing with one at time </th> and </td>. i didn't put them at the same time.

Sukotto [lookingglas] February 23 2006 12:31 AM EST

Not sure what you tried, but Bart meant you should:

<table border="1">
<tr>
<th>heading1</th>
<th>heading2</th>
</tr>
<tr>
<td>content1</td>
<td>content2</td>
</tr>
</table>

heading1 heading2
content1 content2

... along with the style info he suggested.

Flamey February 23 2006 12:33 AM EST

i know about that, it works fine but when i try and add this.

<th><td style=color:white;background-color:red;font-size:smaller><b>Tickets</b>
<th><td style=color:white;background-color:blue;font-size:smaller><b>Tickets</b>

it wont work properly

i might be putting it in the wrong place

Sukotto [lookingglas] February 23 2006 12:35 AM EST

use <th>blah</th> or <td>blah</td>

Don't mix them in a table row.

Flamey February 23 2006 12:37 AM EST

dont i need to use both <th> <td>, and i thought they stood for table heading and table data.

Sukotto [lookingglas] February 23 2006 12:42 AM EST

try this

<th style="color:white;background-color:red;font-size:smaller; font-weight: bold;">Tickets</th>
<th style="color:white;background-color:blue;font-size:smaller; font-weight: bold;">Tickets</th>

Tickets Tickets

You might want to skim through the HTML tutorial and the CSS tutorial this weekend. Learning how it actually works isn't very hard and will save you a lot of grief later

Sukotto [lookingglas] February 23 2006 12:45 AM EST

each row <tr> (tr = "table row") is made up of cells. One row of cells are headers <th>text</th> (th = "table headers"), the other rows are data <td>text</td> (td = "table data"). So you wrap each cell in one of the codes depending on what type of information is in that cell.
This thread is closed to new posts. However, you are welcome to reference it from a new thread; link this with the html <a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001iOE">Html(Table) help</a>