Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted Spacing between images 1

Status
Not open for further replies.

dagger2002

Programmer
Nov 23, 2004
172
US
Hey all I need some new eyes on this code. I am running into a space between my images and I can't find it anywhere.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml"[/URL] xml:lang="en" lang="en">

	<head>
		<meta http-equiv="content-type" content="text/html; charset=charset=iso-8859-1" />
		<title>Untitled</title>
		<meta name="generator" content="BBEdit 8.0" />
	</head>

	<body><!--bgcolor="#324c93"-->
		<table cellpadding="0" cellspacing="0" border="0" valign="top" align="left">
			<tr valign="top" align="left">
				<td>
					<img src="images/SOE05.gif" width="122" height="661" align="left" />
				</td>
				
				<td>
					<table cellpadding="0" cellspacing="0" border="0" valign="top" align="left">
						<tr valign="top">
							<td>
								<img src="images/SOE05-02.gif" width="556" height="191" align="left" />
							</td>
						</tr>
						
						<tr bgcolor="#FFFFFF" valign="top">
							<td>&nbsp;</td>
						</tr>
					</table>
				</td>
				
				<td>
					<img src="images/SOE05_03.gif" width="122" height="661" align="left" />
	</body>

</html>

thanks all
 
forgot to tell e1 that of course the only browser that this breaks in is IE. But what else is new
 
Is there a reason you're not closing the <td> and the <table> at the bottom of the page?

Lee
 
The only way I can replicate it is by replacing the &nbsp; with a lot of content, in which case the table expands as it should. You can stop this by changing the <table> tag to:

Code:
<table cellpadding="0" cellspacing="0" border="0" valign="top" align="left" [red]width="800"[/red]>
 
First, you forgot to mention which images give you undesired spaces. Second, as was mentioned, your tabling endeavors end abruptly and that is not good. Third, your problem is probably whitespace. IE has trouble with whitespace and interprets your nicely indented code as <table cell><space><image><space></table cell>. That causes your unwanted spaces. Putting everything in one line usually helps:
Code:
                <td><img src="images/SOE05.gif" width="122" height="661" align="left" /></td>
 
Thank you all. I have fixed it the problem was the tags, but it was also setting the vand hspace to zero. This totally fixed it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top