Currently tackling my homework assignment which involves creating a virtual chessboard. Progress has been smooth thus far, as I've managed to write the code for it:
I am now looking to incorporate Letters (A-H) and Numbers (1-8) around the board, replicating a real-life chessboard. This would be visible within the "border" element upon inspecting the page source.
<table class="frame">
<tr>
<td class="ivory">A8</td>
<td class="brown">B8</td>
<td class="ivory">C8</td>
<td class="brown">D8</td>
<td class="ivory">E8</td>
<td class="brown">F8</td>
<td class="ivory">G8</td>
<td class="brown">H8</td>
</tr>
<tr>
<td class="brown">A7</td>
<td class="ivory">B7</td>
<td class="brown">C7</td>
<td class="ivory">D7</td>
<td class="brown">E7</td>
<td class="ivory">F7</td>
<td class="brown">G7</td>
<td class="ivory">H7</td>
</tr>
<tr>
<td class="ivory">A6</td>
<td class="brown">B6</td>
<td class="ivory">C6</td>
<td class="brown">D6</td>
<td class="ivory">E6</td>
<td class="brown">F6</td>
<td class="ivory">G6</td>
<td class="brown">H6</td>
</tr>
<tr>
<td class="brown">A5</td>
<td class="ivory">B5</td>
<td class="brown">C5</td>
<td class="ivory">D5</td>
<td class="brown">E5</td>
<td class="ivory">F5</td>
<td class="brown">G5</td>
<td class="ivory">H5</td>
</tr>
<tr>
<td class="ivory">A4</td>
<td class="brown">B4</td>
<td class="ivory">C4</td>
<td class="brown">D4</td>
<td class="ivory">E4</td>
<td class="brown">F4</td>
<td class="ivory">G4</td>
<td class="brown">H4</td>
</tr>
<tr>
<td class="brown">A3</td>
<td class="ivory">B3</td>
<td class="brown">C3</td>
<td class="ivory">D3</td>
<td class="brown">E3</td>
<td class="ivory">F3</td>
<td class="brown">G3</td>
<td class="ivory">H3</td>
</tr>
<tr>
<td class="ivory">A2</td>
<td class="brown">B2</td>
<td class="ivory">C2</td>
<td class="brown">D2</td>
<td class="ivory">E2</td>
<td class="brown">F2</td>
<td class="ivory">G2</td>
<td class="brown">H2</td>
</tr>
<tr>
<td class="brown">A1</td>
<td class="ivory">B1</td>
<td class="brown">C1</td>
<td class="ivory">D1</td>
<td class="brown">E1</td>
<td class="ivory">F1</td>
<td class="brown">G1</td>
<td class="ivory">H1</td>
</tr>
</table>
The classes are structured in chess.css with the following specifications:
.frame {
margin: 60px auto;
background: black;
border: 40px ridge beige;
}
.ivory {
width: 60px;
height: 60px;
background-color: ivory;
font-size: 12px;
vertical-align: bottom;
}
.brown {
width: 60px;
height: 60px;
background-color: brown;
font-size: 12px;
vertical-align: bottom;
}
Is there a way to append text or string content to the "border"? Or should I opt for creating new columns and rows to include the necessary elements like using ?