user7172888
user7172888

Reputation:

Spaces between table cells that has no border

I just want to decrease the size of space between this two images I put in the table. I'm so sorry I know this is just a basic html code. Please help me.

enter image description here

This is the code:

<table class="sample" width="200" border="0" cellpadding="1" cellspacing="1" >
<tr>
<td align="center" valign="center">
    <a href="#" ><img src="images/reception2.png" alt="" /></a>
    </br>
    SERVICES
    </td>

<td align="center" valign="center">
<a href="#"><img src="images/services2.png"  alt="" /></a>
    </br>
    OFFERS
</td>
</tr>
</table>

Upvotes: 0

Views: 54

Answers (2)

inverted_index
inverted_index

Reputation: 2427

you can use margin property of CSS. for your question margin-right for the SERVICES img and margin-left for the OFFERS img are proper solutions.

Try to add this snippet:

<img src="images/reception2.png" alt="" style="margin-right: -25px"/>

<img src="images/services2.png" alt="" style="margin-left: -25px"/>

Also, You can change the number range to finally find the suitable numbers.

Upvotes: 0

sol
sol

Reputation: 22919

It's hard to advise without seeing the CSS you are using. You could try adjusting the width of the table.

Demo here: http://codepen.io/sol_b/pen/VmQGzr

You can remove the inline style on your table and then target it in your CSS, like this:

.sample {
  width: 200px;
}

Change the width to whatever works.

Upvotes: 1

Related Questions