Jump to content
juan.rojas89

White spaces in my table

Recommended Posts

Hi people!

I'm having an issue in my coding, I created a table and there is a white spacing between cells that I cant get rid of.

I have used cellpadding, styled the no border and still comes up.

I'm also programming in HubSpot so I don't know if this has anything to do since I'm still doing it in HTML.

This is an example of the code used:

 

<tr style="height: 127.056px; border: 0px; border-spacing: 0px;">
<td style="width: 304px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;">
<h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">ADMIN&nbsp;<span style="color: #444444;">EMILY</span></span></h1>
</td>
<td style="width: 314px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;">
<h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="color: #444444; font-size: 36px;"><span style="color: #800000;">MARKETING</span>&nbsp;EMILY</span></h1>
</td>
<td style="width: 298.208px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;">
<h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">DATA <span style="color: #444444;">EMILY</span></span></h1>
</td>
<td style="width: 302.792px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;">
<h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">SALES <span style="color: #444444;">EMILY</span></span></h1>
</td>
<td style="width: 320px; background-image: url('https://cdn2.hubspot.net/hubfs/2294395/gray_BB-07-1.png'); background-size: 100% 100%; background-repeat: no-repeat; height: 127.056px;">
<h1 style="color: #84161a; text-align: center; font-family: Agency FB;"><span style="font-size: 36px;">CUSTOMER SERVICE <span style="color: #444444;">EMILY</span></span></h1>
</td>
</tr>
 

Share this post


Link to post
Share on other sites

Is this an email template? That is the only situation where code like this would be acceptable. 

To remove spacing from between table cells you can use the border-collapse CSS property like this:

<table style="border-collapse:collapse">

  • Like 1

Share this post


Link to post
Share on other sites

I don't understand why simply using html attributes

<table cellspacing="0" cellpadding="0" border="0">

or CSS

<table style="border-spacing: 0; border: none; padding: 0;">

does not work?

I used both of these, and the spacing disappeared.

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×