PDA

View Full Version : Fitting an image perfectly into a table


Happyhelen
12-02-2006, 10:33 PM
Hey all:

I'm obviously new to Dreamweaver MX, and I've been having quite a problem with my banner at the top of my site. Using photoshop, I made a banner and tried to put it at the top of my site. However, when I inserted the image, the image doesn't fit and leaves a white space around the image...it doesn't fit into the table. So what I had to do is make the background color in that specific cell black so it looks like the entire banner fit into the table. But I want to change the banner so it's a better designed image, but I know that no matter what I do, the image will not fit the cell perfectly. How can I do this?

The site is: www.tudortastic.com

Thanks!
-H

domedia
12-03-2006, 12:16 AM
Hi Helen,
If you are talking about the space on top and bottom of the image, it can be fixed by removing the paragraph tags that surrounds your image. Paragraphs (<p>) have default margins to separate them, but they're not need for an image since it's not text.

So change this:
<td colspan="2" id="header"><div align="center">
<p><a href="index.htm"><img src="images/tudorbanner.jpg" width="946" height="86" border="0"></a></p>

</div></td>
This this:
<td colspan="2" id="header"><div align="center">
<a href="index.htm"><img src="images/tudorbanner.jpg" width="946" height="86" border="0"></a>

</div></td>