Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
venitk
Community Champion

Adding bottom border to a table without CSS

Jump to solution

I'm working on a finance/accounting course, lots of tables. I want to have borders on the bottoms of the rows only (so, only have horizontal lines). But I can't change the overall subaccount CSS because rules.

Is there a way to only add bottom borders using HTML code, not CSS? I'm ok applying the code to each cell or row individually if that's what it takes (but I'd rather not).

Labels (1)
0 Kudos
1 Solution

Accepted Solutions
chofer
Community Coach
Community Coach

Hello @venitk ...

A Google search brought me to the following page: Create table with only bottom border in HTML - Stack Overflow.

I tried the following code snippet from that page in a Canvas page, and it worked as expected:

<table style="border-collapse: collapse;">
  <tbody>
    <tr style="border-bottom: 1px solid black;">
      <td>Lorem</td>
      <td>Ipsum</td>
    </tr>
  </tbody>
</table>

I hope this will be of some help to you.  Sing out if you have any other questions...thanks!  Take care...be well. 

View solution in original post

3 Replies
chofer
Community Coach
Community Coach

Hello @venitk ...

A Google search brought me to the following page: Create table with only bottom border in HTML - Stack Overflow.

I tried the following code snippet from that page in a Canvas page, and it worked as expected:

<table style="border-collapse: collapse;">
  <tbody>
    <tr style="border-bottom: 1px solid black;">
      <td>Lorem</td>
      <td>Ipsum</td>
    </tr>
  </tbody>
</table>

I hope this will be of some help to you.  Sing out if you have any other questions...thanks!  Take care...be well. 

venitk
Community Champion

Thanks, Chris, I think this will do the trick! I spent two hours trying to Google a code snippet that would work and came up with nothing. Hopefully it didn't take you that long. 🙂  

Much appreciated

chofer
Community Coach
Community Coach

Didn't spend much time on it at all, really...maybe a minute or two?  I just typed this in my Google search: bottom border table html, and I got a few good results right away.  🙂