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
https://forums.phpfreaks.com/topic/168270-indent-tables-td-4-pixels/
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.