Can you see what is wrong with my code please?

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I am very new to this HTML lark and am on the verge of giving up. I had
hoped Frontpage would be the answer to my dreams but now I don't feel so
certain.

The problem I am seeing is, that although the table is defined at 200px wide
and the image is also specified to be 200px wide the image is pushing the
table out to 202px.

I have tried setting the image at 198 but then of course the picture is less
than the cell above it. I want the coloured cell above the picture to be
the same width as the picture.

I have no idea what I am doing wrong and have had no luck Googling for an
answer.

Please could anyone advise me what is going on? I really hope so.

Thanks for looking.

Don
 
Don said:
I am very new to this HTML lark and am on the verge of giving up. I had
hoped Frontpage would be the answer to my dreams but now I don't feel so
certain.

The problem I am seeing is, that although the table is defined at 200px
wide and the image is also specified to be 200px wide the image is pushing
the table out to 202px.

I have tried setting the image at 198 but then of course the picture is
less than the cell above it. I want the coloured cell above the picture
to be the same width as the picture.

I have no idea what I am doing wrong and have had no luck Googling for an
answer.

Please could anyone advise me what is going on? I really hope so.

Thanks for looking.

Don

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>This would just be an informatio</title>
</head>
<body>

<div align="center">
<table border="0" cellpadding="0" width="200">
<tr>
<td valign="top"><table >
<tr>
<td width="100%" height="15" bgcolor="#FDB200" >This would just be an
information pane and this text is only here for filling the box so that it
will not be empty.</td>
</tr>
<tr>
<td width="100%" height="15">
<img border="0" src="images/pumpkin.jpg" width="200" height="150"
hspace="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>

</body>
</html>
 
Can your provide a URL to this page?

Make sure that all table / cell padding is set to zero, as well as making sure the image doesn't
have any background blending borders.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
<table border="0" cellpadding="0" width="200">

should be -

<table border="0" cellpadding="0" cellspacing="0" width="200">

If you don't specify all three of the cell attributes, you get the default
for the one that's missing.
 
Murray said:
<table border="0" cellpadding="0" width="200">

should be -

<table border="0" cellpadding="0" cellspacing="0" width="200">

If you don't specify all three of the cell attributes, you get the default
for the one that's missing.

Sadly that did not work Murray. I now have the following code but the table
is still pushed out by 2px.



<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>This would just be an informatio</title>
</head>
<body>

<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="200">

<tr>
<td valign="top"><table >
<tr>
<td width="100%" height="15" bgcolor="#FDB200" >This would just be
an information pane and this text is only here for filling
the box so that it will not be empty.</td>
</tr>
<tr>
<td width="100%" height="15">
<img border="0" src="images/pumpkin.jpg" width="200" height="150"
hspace="0"></td>
</tr>
</table>
</td>
</tr>
</table>
</div>

</body>
</html>
 
Thomas A. Rowe said:
Can your provide a URL to this page?

Make sure that all table / cell padding is set to zero, as well as making
sure the image doesn't have any background blending borders.

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================

Thank you Thomas.

Please look at:

http://81.179.168.184/
 
And what is this?

<td valign="top"><table >
------------------------^^^^^^^

Chopped liver? 8)
 
Try:

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>This would just be an informatio</title>
</head>
<body>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="200">
<tr>
<td valign="top"><table>
<tr>
<td width="100%" height="15" bgcolor="#FDB200" >This would just be
an information pane and this text is only here for filling
the box so that it will not be empty.</td>
</tr>
<tr>
<td width="100%"><img border="0" src="images/pumpkin.jpg" width="200" height="150"></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>

--
==============================================
Thomas A. Rowe
Microsoft MVP - FrontPage

http://www.Ecom-Data.com
==============================================
 
Your cell is specified in %, not Pixels.
Your table has no specifications set.
--
===
Tom Willett
Microsoft MVP - FrontPage
---
FrontPage Support:
http://www.frontpagemvps.com/
===
|
| | > Can your provide a URL to this page?
| >
| > Make sure that all table / cell padding is set to zero, as well as
making
| > sure the image doesn't have any background blending borders.
| >
| > --
| > ==============================================
| > Thomas A. Rowe
| > Microsoft MVP - FrontPage
| >
| > http://www.Ecom-Data.com
| > ==============================================
|
| Thank you Thomas.
|
| Please look at:
|
| http://81.179.168.184/
|
|
|
 
Tom Willett said:
Your cell is specified in %, not Pixels.
Your table has no specifications set.

I am not clear why the % bit would make a difference to my problem as it
only defines that the cell must stretch for the entire width of the table
IIUC.

Have I misunderstood this please Tom?

Don
 
Thomas A. Rowe said:
Try:

<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>This would just be an informatio</title>
</head>
<body>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="200">
<tr>
<td valign="top"><table>
<tr>
<td width="100%" height="15" bgcolor="#FDB200" >This would just be
an information pane and this text is only here for filling
the box so that it will not be empty.</td>
</tr>
<tr>
<td width="100%"><img border="0" src="images/pumpkin.jpg" width="200"
height="150"></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>
</html>
That did not work Thomas. I have now fixed it I think with Murray's help.
Please see the test I have now on the address:

http://81.179.168.184/

Your test is the bottom one. The first three behave how I want. The
problem I was having was that an image of 200px made the table expand to
202px.

The 2nd and 3rd examples show that the table will not shrink if the image is
undersize but it will expand only if the image is over 200px which is fine.

Thank you for your time and efforts in helping me.

Don
 
Murray said:
And what is this?

<td valign="top"><table >
------------------------^^^^^^^

Chopped liver? 8)

Thank you Murray, you fixed it mate.

I am very grateful to you for all of your help.

Don
 
Back
Top