Jump to content

indent tables TD 4 pixels


jasonc

Recommended Posts

I wish to have my tables TD elements indented by 4px but can not seem to get it right.

 

<style>
td.hpm { margin-left: 4;};
</style>
    <table width="82%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#111111" bgcolor="#FFFFFF" style="border-collapse: collapse">
	<tr> 
        <td class="hpm" width="100%"><font face="Arial" size="2" color="#003399">Your Link</font></td>
      </tr>
      <tr> 
        <td class="hpm" width="100%"><font face="Arial" size="2" color="#003399">Your Link</font></td>
      </tr>
    </table>

can someone please tell me what it is that i could be doing wrong.

Link to comment
Share on other sites

I can tell you what you are doing wrong:

 

1) You are using deprecated tags (<font>) and deprecated attributes (align)

2) You are trying to add margins to indent td tags (can't be done)

3) You are setting the margin to 4. In CSS, you have to say four of something - pixels, millimiters, inches etc.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.