Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove space between 2 rows

Tags:

html

This is my html

<table >

                 <tr>
                     <td></td>

                     <td   style="width: 180px;text-align: right">2323</td>

                </tr>

                <tr>
                    <td><strong>Name</strong></td>
                    <td  style="width: 180px" >GGGG</td>

                </tr>

                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td><strong > Test</strong></td>

                </tr>
                <tr>

                    <td  style="border-bottom: 1px solid #000">&nbsp;   </td>
                </tr>


            </table>

Here is fiddle link

You can see there is gap between text "Test" and the line

How to remove this space?

I tried using style="border-spacing: 0;border-collapse: collapse"

like image 381
James Avatar asked Jan 27 '26 13:01

James


1 Answers

replace

<tr>
   <td><strong > Test</strong></td>
</tr>
<tr>
    <td style="border-bottom: 1px solid #000">&nbsp;   </td>
</tr>

with

<tr>
   <td style="border-bottom: 1px solid #000;"><strong > Test</strong></td>
</tr>

Demo

like image 75
Dipesh Parmar Avatar answered Jan 29 '26 03:01

Dipesh Parmar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!