View Full Version : Confusion with cellspacing/cellpadding


willworkforchoc
06-07-2003, 06:00 PM
I am trying to create a page with 3 layers of background. But I am spending a lot of time trying to get the right widths on each one. On the site below, the middle layer is too thin and the top layer is too thick and the text looks like its boxed. Any suggestions would be appreciated.
http://www.geocities.com/laharold2003

pb&j
06-08-2003, 04:41 AM
cool, Langley, just around the corner from Surrey :D

are you referring to the main frame welcome page area? looks ok to me, but perhaps explain a bit more on what you would like it to look like (or not like?). it looks like there are 3 boxes on each side of the middle checkered area and the purple is pretty even till the bottom parts.

if you are working with cellpadding and cellspacing...

cellpadding = the space buffer between cell contents and the cell walls.

cellspacing = the thickness of the cell walls.

willworkforchoc
06-08-2003, 03:05 PM
Thanks for the reply, PB&J (I recently moved to Langley from Surrey!)

On this page, the middle seems messed up. Is there a spacing tag (I prefer to use % as I have a small monitor)so that all 3 layers (or at least the 2 back ones) are equal. Thanks
http://www.geocities.com/laharold2003/family.html

pb&j
06-08-2003, 04:11 PM
this is just a quick shot, but create a new page, try the below code, upload it to your online space and see if that is close to what you are looking for...


<html>

<head>
<title> test </title>
</head>

<body>

<table background="ccbg1.gif" border="0" width="100%"><tr><td align="center" valign="middle">

<table background="ccbg2.gif" border="1" width="90%"><tr><td align="center" valign="middle">

<table bgcolor="#CFB1D8" border="1" width="90%" cellpadding="10"><tr><td align="center">

<img src="chkbd3.gif"><br>
<p><font face="comic sans ms" color="#000000" size="4">Well, School is almost over for another year! God is so good! I feel very blessed to have the year I've had at The King's School. It's a great place to work and teach. God has given me great parents and students this year too. I'm sure I gained a few extra pounds just from all the chocolate I consumed!<img src="chocbl.gif">I have already started planning for next year's class and well as starting this website! I will be posting pictures during the summer.I'm really looking forward to a summer where I don't have to work. I can play with Lucas and Amanda and be with family and friends!<br>June 5th - Today we went to White Rock beach for a field trip - what perfect weather! We saw all kinds of sea life. As I was walking slowly through the water, I saw a clear jellyfish with long orange tentacles. One of the students had a container so we scooped it up so that many of them could see it. That was the first time I've ever seen one up close and not in an aquarium! We also saw hermit crabs, anemones, starfish. It was a great day! Busy weekend coming up.<br><font size="3">Music "Linus and Lucy"<br>right click to turn off/adjust volume.</font></font>

</table>
</table>
</table>

</body>
</html>

willworkforchoc
06-09-2003, 01:27 AM
It almost worked. There is just no spacing between the layers at the top and bottom. The test page is below...http://www.geocities.com/laharold2003/test.html

pb&j
06-09-2003, 05:58 AM
in the two spots where it says...
WIDTH="90%"
try adding on after them...
height="90%"
i hate using the height property in a table since it tends to be a bit wonky at times, but it just may do the trick.

you may also want to put the very final > bracket on the final </html> tag.

willworkforchoc
06-10-2003, 02:00 AM
Okay you're good, how did know I left out the last bracket?

added height but nothing happened

pb&j
06-10-2003, 04:52 AM
ok, i know this is a step backwards, but the percentage doesn't seem to want to stick to a table. so give this a go as your test page...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> test </title>
</head>
<body style="margin:0px;">
<table background="ccbg1.gif" border="0" style="width:100%;"><tr><td style="text-align:center;padding:30px;">
<table background="ccbg2.gif" border="1"><tr><td style="text-align:center;padding:30px;">
<table bgcolor="#CFB1D8" border="1"><tr><td style="text-align:center;padding:30px;">
<img src="chkbd3.gif"><br>
<p><font face="comic sans ms" color="#000000" size="4">Well, School is almost over for another year! God is so good! I feel very blessed to have the year I've had at The King's School. It's a great place to work and teach. God has given me great parents and students this year too. I'm sure I gained a few extra pounds just from all the chocolate I consumed!<img src="chocbl.gif">I have already started planning for next year's class and well as starting this website! I will be posting pictures during the summer.I'm really looking forward to a summer where I don't have to work. I can play with Lucas and Amanda and be with family and friends!<br>June 5th - Today we went to White Rock beach for a field trip - what perfect weather! We saw all kinds of sea life. As I was walking slowly through the water, I saw a clear jellyfish with long orange tentacles. One of the students had a container so we scooped it up so that many of them could see it. That was the first time I've ever seen one up close and not in an aquarium! We also saw hermit crabs, anemones, starfish. It was a great day! Busy weekend coming up.<br><font size="3">Music "Linus and Lucy"<br>right click to turn off/adjust volume.</font></font>
</table>
</table>
</table>
</body>
</html>

as for knowing about the ending bracket... magic. your most recent showing of "test.html" has the bracket in, but it also has an additional ending </body></html> tag set at the end now.

with the above coding, just adjust the 30px parts until you get the desired spacing.


*** edit ***
when you see this...
<table bgcolor="#CFB1D8" border="1"><tr><td style="text-align:center;padding:30px;">
that is supposed to be on all one line. this forum kinda breaks it up for whatever reasons.
*** edit ***

willworkforchoc
06-10-2003, 01:32 PM
It worked! thanks so much pb&j for all your time, it is greatly appreciated.

pb&j
06-10-2003, 02:33 PM
np.
cheers!