Unexplained Whitespace

C

cfps.Christian

I'm not too terribly efficient in HTML or ASP.NET but I know enough to
get into trouble

<table id="tblImgAlign" runat="server" width="100%" cellspacing="0"
style="border-style:none" cellpadding="0">
<tr>
<th style="width:179px; border-style:none">
<asp:Image ID="imgLeft" runat="server" ImageUrl="~/
Images/TopLeft.PNG"/>
</th>
<th style="background-image:url(/Images/TopCenter.PNG);
background-repeat:repeat-x; border-style:none">
<asp:Label ID="lblHeader" runat="server"
Text="Testimony Apparel" />
</th>
<th style="width:217px; border-style:none; margin-top:0px">
<asp:Image ID="imgRight" runat="server" ImageUrl="~/
Images/TopRight.PNG"/>
</th>
</tr>
</table>

The final image has a chunk of whitespace right above it which is
preventing the 3 images from lining up. If anyone has any ideas on
what could be causing it please tell me.

I've tried the margins, imagealign, and a few other things that are
simple.

The Source also leaves the whitespace unexplained.
 
D

Dave Bush

The tab character, newline character, and linefeed characters all count
as a space in html. They only show as one space, but they all count.

This is esp. a problem with images, as you've seen. To get around it,
you want to have all of your ending brackets touching your beginning
brackets in the area where your images are.

<table id="tblImgAlign" runat="server" width="100%" cellspacing="0"
style="border-style:none" cellpadding="0">
<tr>
<th style="width:179px; border-style:none"><asp:Image
ID="imgLeft" runat="server" ImageUrl="~/
Images/TopLeft.PNG"/></th>
<th style="background-image:url(/Images/TopCenter.PNG);
background-repeat:repeat-x; border-style:none">
<asp:Label ID="lblHeader" runat="server"
Text="Testimony Apparel" />
</th>
<th style="width:217px; border-style:none;
margin-top:0px"><asp:Image ID="imgRight" runat="server" ImageUrl="~/
Images/TopRight.PNG"/></th>
</tr>
</table>



-----Original Message-----
From: cfps.Christian [mailto:[email protected]]
Posted At: Tuesday, November 27, 2007 12:08 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Unexplained Whitespace
Subject: Unexplained Whitespace

I'm not too terribly efficient in HTML or ASP.NET but I know enough to
get into trouble

<table id="tblImgAlign" runat="server" width="100%" cellspacing="0"
style="border-style:none" cellpadding="0">
<tr>
<th style="width:179px; border-style:none">
<asp:Image ID="imgLeft" runat="server" ImageUrl="~/
Images/TopLeft.PNG"/>
</th>
<th style="background-image:url(/Images/TopCenter.PNG);
background-repeat:repeat-x; border-style:none">
<asp:Label ID="lblHeader" runat="server"
Text="Testimony Apparel" />
</th>
<th style="width:217px; border-style:none; margin-top:0px">
<asp:Image ID="imgRight" runat="server" ImageUrl="~/
Images/TopRight.PNG"/>
</th>
</tr>
</table>

The final image has a chunk of whitespace right above it which is
preventing the 3 images from lining up. If anyone has any ideas on
what could be causing it please tell me.

I've tried the margins, imagealign, and a few other things that are
simple.

The Source also leaves the whitespace unexplained.
 
C

cfps.Christian

The tab character, newline character, and linefeed characters all count
as a space in html. They only show as one space, but they all count.

This is esp. a problem with images, as you've seen. To get around it,
you want to have all of your ending brackets touching your beginning
brackets in the area where your images are.

<table id="tblImgAlign" runat="server" width="100%" cellspacing="0"
style="border-style:none" cellpadding="0">
<tr>
<th style="width:179px; border-style:none"><asp:Image
ID="imgLeft" runat="server" ImageUrl="~/
Images/TopLeft.PNG"/></th>
<th style="background-image:url(/Images/TopCenter.PNG);
background-repeat:repeat-x; border-style:none">
<asp:Label ID="lblHeader" runat="server"
Text="Testimony Apparel" />
</th>
<th style="width:217px; border-style:none;
margin-top:0px"><asp:Image ID="imgRight" runat="server" ImageUrl="~/
Images/TopRight.PNG"/></th>
</tr>
</table>

-----Original Message-----
From: cfps.Christian [mailto:[email protected]]

Posted At: Tuesday, November 27, 2007 12:08 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Unexplained Whitespace
Subject: Unexplained Whitespace

I'm not too terribly efficient in HTML or ASP.NET but I know enough to
get into trouble

<table id="tblImgAlign" runat="server" width="100%" cellspacing="0"
style="border-style:none" cellpadding="0">
<tr>
<th style="width:179px; border-style:none">
<asp:Image ID="imgLeft" runat="server" ImageUrl="~/
Images/TopLeft.PNG"/>
</th>
<th style="background-image:url(/Images/TopCenter.PNG);
background-repeat:repeat-x; border-style:none">
<asp:Label ID="lblHeader" runat="server"
Text="Testimony Apparel" />
</th>
<th style="width:217px; border-style:none; margin-top:0px">
<asp:Image ID="imgRight" runat="server" ImageUrl="~/
Images/TopRight.PNG"/>
</th>
</tr>
</table>

The final image has a chunk of whitespace right above it which is
preventing the 3 images from lining up. If anyone has any ideas on
what could be causing it please tell me.

I've tried the margins, imagealign, and a few other things that are
simple.

The Source also leaves the whitespace unexplained.

I just tried that and it didn't work. I'm not sure how I solved this
problem before but it consisted of rewriting something and
unfortunately this is the rewrite.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top