Tables

Here you can put any resources or helpful links you think would be useful for members.
User avatar

Topic author
theICON562
Posts: 386
Joined: 13 Feb 2024, 17:47

Tables

Post by theICON562 » 07 Mar 2024, 06:12

Caesar wrote:
06 Mar 2024, 19:01
theICON562 wrote:
05 Mar 2024, 20:20
Caesar wrote:
25 Feb 2024, 17:45
The board uses BBCode. We've made some code swaps for HTML. Here are the relevant BBCodes for tables and what they correspond to for HTML.

Table
BBCode:
[table={NUMBER1},{NUMBER2},{NUMBER3},{NUMBER4}]{TEXT}[/table]

HTML:
<table cellpadding="{NUMBER1}" cellspacing="{NUMBER2}" width="{NUMBER3}" style="border:{NUMBER4}px solid #CCC; font-family:Verdana, Geneva, sans-serif;"> {TEXT}</table>

TD
BBCode:
[td]{TEXT}[/td]

HTML:
<td>{TEXT}</td>

TF
[tf]{TEXT}[/tf]

<th colspan="2">{TEXT}</th>

TH
[th]{TEXT}[/th]

<th>{TEXT}</th>

TR
[tr]{TEXT}[/tr]

<tr>{TEXT}</tr>

TBODY
[tbody]{TEXT}[/tbody]

<tbody>{TEXT}</tbody>
Can anyone give me an example of how to use the bbcode with cellspacing, cellpadding and border as it shows at the top of the information?

BBCode:
[table={NUMBER1},{NUMBER2},{NUMBER3},{NUMBER4}]{TEXT}[/table]

HTML:
<table cellpadding="{NUMBER1}" cellspacing="{NUMBER2}" width="{NUMBER3}" style="border:{NUMBER4}px solid #CCC; font-family:Verdana, Geneva, sans-serif;"> {TEXT}</table>

For NUMBER1, NUMBER2, NUMBER3 and NUMBER4, how would you write that in bbcode within the table?
This no longer works. I had to disable it to make the tables work as above.
Could you perhaps give me an example of how the bbcode will look for a simple table (for example, the score by periods of an nba game).
CoachGreg
User avatar

Caesar
Posts: 6135
Joined: 27 Nov 2018, 10:47

Tables

Post by Caesar » 07 Mar 2024, 07:01

theICON562 wrote:
07 Mar 2024, 06:12
Could you perhaps give me an example of how the bbcode will look for a simple table (for example, the score by periods of an nba game).
1 2 3 4
team 11 11 11 11
team 11 11 11 11
Click quote reply to see code
User avatar

Topic author
theICON562
Posts: 386
Joined: 13 Feb 2024, 17:47

Tables

Post by theICON562 » 07 Mar 2024, 14:54

Awesome. Thank you very much.
CoachGreg
User avatar

djp73
Posts: 5370
Joined: 27 Nov 2018, 13:42

Tables

Post by djp73 » 22 Apr 2024, 12:13

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Golf Scorecard</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>Golf Scorecard</h1>
<table>
<thead>
<tr>
<th>Hole</th>
<th>Par</th>
<th>Your Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>4</td>
<td><input type="number" min="1" max="10"></td>
</tr>
<tr>
<td>2</td>
<td>3</td>
<td><input type="number" min="1" max="10"></td>
</tr>
<!-- Add more rows for each hole -->
</tbody>
</table>
</body>
</html>
User avatar

djp73
Posts: 5370
Joined: 27 Nov 2018, 13:42

Tables

Post by djp73 » 22 Apr 2024, 12:14

<!-- Add more rows for each hole -->
HoleParYour Score
1[par=1][score=1]
2[par=2][score=2]
3[par=3][score=3]
User avatar

Caesar
Posts: 6135
Joined: 27 Nov 2018, 10:47

Tables

Post by Caesar » 22 Apr 2024, 19:20

djp73 wrote:
22 Apr 2024, 12:13
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Golf Scorecard</title>
<style>
table {
border-collapse: collapse;
width: 100%;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: center;
}
th {
background-color: #f2f2f2;
}
</style>
</head>
<body>
<h1>Golf Scorecard</h1>
<table>
<thead>
<tr>
<th>Hole</th>
<th>Par</th>
<th>Your Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>4</td>
<td><input type="number" min="1" max="10"></td>
</tr>
<tr>
<td>2</td>
<td>3</td>
<td><input type="number" min="1" max="10"></td>
</tr>
<!-- Add more rows for each hole -->
</tbody>
</table>
</body>
</html>
This is all HTML and can't be used here.
User avatar

djp73
Posts: 5370
Joined: 27 Nov 2018, 13:42

Tables

Post by djp73 » 22 Apr 2024, 19:49

Only meant to post the 2nd one
Post Reply