I recently set up a login portal page for three different websites. The layout consists of three separate login portals displayed neatly in two columns within a table named "loginPortals". I am currently working on styling the page using CSS, aiming to enhance my skills and keep the code streamlined.
To give you an idea of the structure, here is a snippet of the HTML:
<table class="loginPortals">
<tbody>
<tr>
<td>Picture 1</td>
<td>Login form 1</td>
</tr>
<tr>
<td>Picture 2</td>
<td>Login form 2</td>
</tr>
<tr>
<td>Picture 3</td>
<td>Login form 3</td>
</tr>
</tbody>
</table>
Although I have started working on the CSS, it's far from complete. One issue I am facing is with applying borders between each row. My current attempt is not achieving the desired outcome, as it adds unwanted thickness in the middle of rows due to top border being applied to all cells.
.loginPortals{
width:100%;
}
.loginPortals tbody:first-child td{
border-top:1px solid #000;
}
.loginPortals tbody tr td{
border-bottom:1px solid #000;
padding:1em 0;
}
The use of the first-child selector did not work as intended, resulting in thicker borders than expected. How can I resolve this issue without adding more classes or inline styles?
Any input would be greatly appreciated!
Joe