setting the margin in one cell

T

tshad

I have one cell (<td>) that I want to have a margin in to move everything
away from the left border by about 10 px.

The only way I can seem to do it is to add cellspacing in each of the
elements in the Cell (2 tables and button). I wanted to set it in just one
place. "<td style=margin-left:10>" doesn't do anything.

Is there a way to do this?

Thanks,

Tom.
 
M

Mark Fitzpatrick

Tom,
There's an easier way. You need margins, but can't get them on a
cell since a cell doesn't have a margin property. You can't set the
cellspacing or padding because it does it to every cell. So, the next best
thing is to find a way that you're only dealing with one cell and don't have
to worry about the rest. Put a one celled table within that cell then you
can set the padding of that table to what you need and place your content in
that table, or have two cells, one that has a width of 10 (with a spacer
image in it to hold the width at 10), and the other uses the rest.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
T

tshad

Mark Fitzpatrick said:
Tom,
There's an easier way. You need margins, but can't get them on a
cell since a cell doesn't have a margin property. You can't set the
cellspacing or padding because it does it to every cell. So, the next best
thing is to find a way that you're only dealing with one cell and don't
have to worry about the rest. Put a one celled table within that cell then
you can set the padding of that table to what you need and place your
content in that table, or have two cells, one that has a width of 10 (with
a spacer image in it to hold the width at 10), and the other uses the
rest.

But I already have lots of tables in the page. Is that going to be "table
overload" for just one cell?

Also, how do I set up a space image? Is that just a transparent image?

Thanks,

Tom.
 
B

bruce barker

td's do not have a margin, thats handled by the cellspacing. you want to set
the padding

<td style="padding-left:10">

-- bruce (sqlwork.com)


| I have one cell (<td>) that I want to have a margin in to move everything
| away from the left border by about 10 px.
|
| The only way I can seem to do it is to add cellspacing in each of the
| elements in the Cell (2 tables and button). I wanted to set it in just
one
| place. "<td style=margin-left:10>" doesn't do anything.
|
| Is there a way to do this?
|
| Thanks,
|
| Tom.
|
|
 
T

tshad

bruce barker said:
td's do not have a margin, thats handled by the cellspacing. you want to
set
the padding

<td style="padding-left:10">

That was what I was looking for.

I assume cellpadding and padding is the same (except that padding you can
give it a direction). One you use "style=" and the other you just put into
the tag.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top