Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Unexplained Whitespace

Reply
Thread Tools

Unexplained Whitespace

 
 
cfps.Christian
Guest
Posts: n/a
 
      11-27-2007
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.
 
Reply With Quote
 
 
 
 
Dave Bush
Guest
Posts: n/a
 
      11-27-2007
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 [(E-Mail Removed)]
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.

 
Reply With Quote
 
 
 
 
cfps.Christian
Guest
Posts: n/a
 
      11-27-2007
On Nov 27, 12:52 pm, "Dave Bush" wrote:
> 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 [(E-Mail Removed)]
>
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Splitting text at whitespace but keeping the whitespace in thereturned list MRAB Python 3 01-26-2010 11:36 PM
Structure using whitespace vs logical whitespace cmdrrickhunter@yaho.com Python 10 12-16-2008 03:51 PM
Whitespace where I don't want whitespace! Oli Filth HTML 9 01-17-2005 08:47 PM
NEWBIE:unexplained syntax error Michiel Perl 2 09-10-2004 02:54 PM
unexplained bad performance of multipoint gre tunnel ... Garry Glendown Cisco 1 12-26-2003 10:23 AM



Advertisments