473,387 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

unwanted blank space in tables

Buz
I am having a problem with extra, unwanted space showing
up on my web form tables. I've tried hand coding and can
get the htm file to display fine. But as soon as I bring
the form into Visual Studio, convert it to an aspx web
form, and insert my user controls, I start getting extra
blank space between my rows, even when I give an
explicit "height" attribute.

The problem seems to occur with tables that have rowspans
and/or user controls. It is extremely frustrating. I have
tried everything, but once Visual Studio gets ahold of
the form, the white space shows up.

Help would be greatly appreciated. Thank you.

Buz
Nov 22 '05 #1
4 2091
Hi Buz,

Did you have HTML Table in the form and your Web User control is in the
Table's Cell? Based on my experience, there may be some unwant blank lines
in this situation, due to the size of Web User control. Once it is
displayed in a cell, other cell in same row have to fit same height, this
may cause some unwant blank lines.

Would you please post some actual code which can reprodcue the problem
exactly? With them, we may try to find if there is other way to display the
control and table in proper mode.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 22 '05 #2
Hi Buz,

Did you have HTML Table in the form and your Web User control is in the
Table's Cell? Based on my experience, there may be some unwant blank lines
in this situation, due to the size of Web User control. Once it is
displayed in a cell, other cell in same row have to fit same height, this
may cause some unwant blank lines.

Would you please post some actual code which can reprodcue the problem
exactly? With them, we may try to find if there is other way to display the
control and table in proper mode.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 22 '05 #3


Well, you are right. I removed the three user controls in my 3 X 3 HTML
table and the problem resolved. I added back in my first user control, a
row-span of the first table column and there was still no problem. I
added in my second control (an Amazon.com link) which is a row span of
the bottom two cells of the right hand column and the problem partially
returned. I added back the third user control (a roll-over image link)
to the top right cell and the problem returned completely.

I expected the top row to expand to hold the user control, but the
expansion appears to be longer than the user control by a line or two.
Also, my left user contol does not "top" properely now.

Here is the HTML body:

<HTML>
<body>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td rowspan="3" width="148" valign="top">&nbsp;
<uc1:MLSideBar id="MLSideBar1" runat="server"></uc1:MLSideBar></td>
<td align="center" valign="middle"><img
src="Madame_librarian_banner.gif" width="544" height="128"></td>
<td width="130" valign="top" align="center">
<uc1:WordFairRollOver id="WordFairRollOver1"
runat="server"></uc1:WordFairRollOver>&nbsp;</td>
</tr>
<tr>
<td><div align="center"><font size="+2" face="Verdana, Arial,
Helvetica, sans-serif"><strong>Link Lists</strong></font></div></td>
<td rowspan="2" valign="top">&nbsp;
<uc1:AmazonList id="AmazonList1"
runat="server"></uc1:AmazonSearch></td>
</tr>
<tr>
<td valign="top"><p><font face="Verdana, Arial, Helvetica,
sans-serif">Wording goes here</td>
</tr>
</table>
</body>
</HTML>

Now the user control:

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<TABLE id="tblWordFairRO" cellSpacing="1" cellPadding="1" width="152"
border="0">
<TR>
<td width="39" valign=top align="center"&gt;<a href="http://wordfair"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('wordfair','','../images/fair_tentsmall2.gif',
1)"><img src="../images/fair_tentsmall.gif" alt="Word Fair"
name="wordfair" width="150" height="155"
border="0"></A></td>
</TR>
<TR>
<TD>
<P align=center><FONT face=Verdana>Writing
Services</FONT></P></TD>
</TR>
</TABLE>

Sure appreciate you looking at this. Thank you.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 22 '05 #4
Hi Buz,

In the user control's table:

<TABLE id="tblWordFairRO" cellSpacing="1" cellPadding="1" width="152"
border="0">
You only specify the width not with height. If you set it to a proper
value, will the problem get better?

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Steve K | last post by:
Hi, The site I've just created, when tested on a windows PC has an unwanted white space (about 2-4 pixels high) in between two tables. I would like there to be zero space there. Here is the test...
3
by: Brian | last post by:
I have a page with content, navigation, and footer divs, in that order. The nav div has position: absolute, width 8em, on green background. The other divs have an 8em green left border, such that...
3
by: Buz | last post by:
I am having a problem with extra, unwanted space showing up on my web form tables. I've tried hand coding and can get the htm file to display fine. But as soon as I bring the form into Visual...
0
by: John Dann | last post by:
I'm creating a Listview control in details view under VB.Net which always has 31 rows (populated at runtime) and 4 columns (ie 1 item plus 3 subitems) of specified width. But at runtime and...
16
by: lovecreatesbeauty | last post by:
/* When should we worry about the unwanted chars in input stream? Can we predicate this kind of behavior and prevent it before debugging and testing? What's the guideline for dealing with it? ...
3
by: Jeff Calico | last post by:
Hello everyone I am transforming an XML document to text, basically only outputting a small portion of it. When I run the following XSLT via Xalan's processor, I get a bunch of unwanted blank...
3
by: et | last post by:
How can I strip out unwanted characters in a string before updating the database? For instance, in names & addresses in our client table, we want only letters and numbers, no punctuation. Is...
5
by: Tom | last post by:
I am having a problem where an extra gap (whitespace, padding) appears in a table cell where I don't want it. The data fed in the table is via dynamic HTML, so the amount in the middle cell may...
1
by: muthurama | last post by:
How to remove the unwanted space between two tables in the HTML
3
by: Joe Stateson | last post by:
I have a template field that contains filenames that are (or can be) on a unix system. The hypen (and others) is a valid filename character in unix. When I display the name of the file I get an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.