473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

setting the margin in one cell

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.
Nov 18 '05 #1
4 1703
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

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uJ**************@TK2MSFTNGP14.phx.gbl...
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.

Nov 18 '05 #2
"Mark Fitzpatrick" <ma******@fitzme.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
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.
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

"tshad" <ts**********@ftsolutions.com> wrote in message
news:uJ**************@TK2MSFTNGP14.phx.gbl...
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.


Nov 18 '05 #3
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)
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uJ**************@TK2MSFTNGP14.phx.gbl...
| 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.
|
|
Nov 18 '05 #4
"bruce barker" <no***********@safeco.com> wrote in message
news:eo**************@TK2MSFTNGP12.phx.gbl...
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
-- bruce (sqlwork.com)
"tshad" <ts**********@ftsolutions.com> wrote in message
news:uJ**************@TK2MSFTNGP14.phx.gbl...
| 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.
|
|

Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gary Hasler | last post by:
I have a full page of thumbnails linked to home plan pages. I'm adding a mouseover/mouseout effect to the table cells, plus a onclick event to permanently set the cell background to indicate the...
2
by: Paul Taylor | last post by:
On my pages I have set the Cell Image (strip_19.gif) from my Images folder as <TD ROWSPAN=2 BACKGROUND="../images/strip_19.gif" WIDTH=19> <P><FONT COLOR="#FFFFFF">|</FONT></P> </TD> That all...
3
by: Rob Meade | last post by:
Hi all, I need to set some table cells which I am adding from code. I am using; cell.backcolor = cell.backcolor.white for example to set it to white - this is all very well and good for a...
2
by: VB Programmer | last post by:
In my Calendar1_DayRender event I'm setting the e.cell.text property equal to a db value. But, the day cell loses it's "clickability" as well as the day #, like the other non-modified day/cells...
1
by: Scott Meddows | last post by:
How do I set row x and column y active in a datagrid? Thanks Scott
1
by: Lonewolf | last post by:
hi all, just want to find out if it is possible to set the gridline of individual cell in a listview using C#. Reason for this is I need to have a listview which has fixed number of columns and...
0
by: K B | last post by:
Hi, I would like to set only certain rows on a DetailsView to readonly or other properties conditionally...is there any way to do this? I've searched with no luck. Thanks, Kit p.s. I...
0
by: Jerry | last post by:
I have an application that is trying to export multiple datasets to and excel workbook in different worksheets. I have gotten the export to work except for string fields that happen to be numbers...
1
by: brixton | last post by:
Hello, probably a simple problem but I can't find how to solve it so here we go... Instead of using a table I'm using lists and CSS for my layout. How do I set the "width" for my list item...
27
by: geniet | last post by:
Hello all of you, I have some problem in setting cells values (or fromat or...) in my Excel spreadsheet using a VB statement like within my Module: Range("C1").Value = 20 I have this in a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.