Page 2 of 2
Tables
Posted: 07 Mar 2024, 06:12
by theICON562
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).
Tables
Posted: 07 Mar 2024, 07:01
by Caesar
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
Tables
Posted: 07 Mar 2024, 14:54
by theICON562
Awesome. Thank you very much.
Tables
Posted: 22 Apr 2024, 12:13
by djp73
<!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>
Tables
Posted: 22 Apr 2024, 12:14
by djp73
Hole | Par | Your Score |
1 | [par=1] | [score=1] |
2 | [par=2] | [score=2] |
3 | [par=3] | [score=3] |
<!-- Add more rows for each hole -->
Tables
Posted: 22 Apr 2024, 19:20
by Caesar
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.
Tables
Posted: 22 Apr 2024, 19:49
by djp73
Only meant to post the 2nd one