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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unwanted blank tables creating evil gaps

Status
Not open for further replies.

BadRabbit

Programmer
Nov 14, 2002
28
GB
I'm using DW to create a page comprised of

* A header table, right across the page
* 3 columns of content below this
* A footer, right across the page

The columns are not the same length - i.e. don't contain the same amount of text, so under one or two of them there will be white space. Which is fine as long as the LONGEST column is butting up against the top of the footer.

But when I alter text in the other columns, it pushes the footer down and I end up with a huge gap between the longest column and the footer. To correct it have to manually remove the blank tables DW has created and that are causing the problem. (Clear Cell Height doesn't work most of the time - it still leaves the offending blank tables).

To make it worse, this is a template for an ASPX page, and content for two of the columns will be dynamically generated and could be pretty much any length.

So my question is, how do I stop DW messing up my formatting by inserting these unwanted blank tables every time I make a change? Is there some sort of setting I can use to prevent it? And if not, how can I avoid laborious manual mods to the HTML every time I make a change?

Thanks! :)
 
Are your table column widths set to specific widths in the html?
 
Yes, the columns are fixed width as they contain non-stretchable border graphics and must be a particular size.
 
"To make it worse, this is a template for an ASPX page, and content for two of the columns will be dynamically generated and could be pretty much any length."

then look into some JS or VBscript that will "cut" the lenght of the text to be dynamically written.



<!-- ================================================================================================ -->
<!-- Create a Function &quot;FieldCut&quot; in order to count the character in returned string and then trim -->
<!-- the string from the right-hand side -->
<!-- ================================================================================================ -->
<%'***FieldCut- control output
Function FieldCut (FCfield,FClenght,FCtrimtype,FCtext)
if FCfield <> &quot;&quot; then
if FCtrimtype = True then
if LEN(FCfield) < FClenght then
FCfield = RIGHT(FCfield, FClenght)
Else
FCfield = RIGHT(FCfield, FClenght) & FCtext
End if
Else
if LEN(FCfield) < FClenght then
FCfield = LEFT(FCfield, FClenght)
Else
FCfield = LEFT(FCfield, FClenght) & FCtext
End if
End if
Response.Write(FCfield)
End if
End Function
%>
.....
...
<%=FieldCut((RS.Fields.Item(&quot;YOUR_FIELD&quot;).Value),20,false,&quot;...&quot;)%>
....
====================
this will &quot;cut&quot; the lengt to possible 20 characters and add &quot;...&quot; at the end of it
eg.
Hello five charaters...

All the best!

> need more info?
:: don't click HERE ::
 
Useful function thanks, I've saved it away, but it's more the HTML columns that are causing problems, in the way DW inserts blank tables as padding whenever a change is made. I've got around this by removing them manually so far, but it's a real pain when they keep re-appearing.
 
oh yeah the HTML part....some auto-functions are nice but sometimes they are auto-pain (eg. resize...loose height of table etc...)
:-(
this function above was very handy for me....since I had to deal with a lot of text stored in memo fields...and then displaying it...well...u know what happens x
All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top