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!

How do I 'pad out' a doc to fill the available space?

Status
Not open for further replies.

AndyGroom

Programmer
May 23, 2001
972
GB
This may seem like a weird question but the reason behind it is that it's being used to create a preview of user-designed email stationery - bear that in mind!

I have an application that generates HTML on the fly so that people can see a preview of their email stationery. They can design a header and footer which are turned into a preview within a WebBrowser control (VB) that has fixed dimensions.

At the moment, the preview isn't great because the footer appears immediately after the header, and I want it to appear at the bottom of the window with white space inbetween (that's where the email message would go).

What HTML could I add inbetween the header and footer HTML code to effectively pad-out the middle area so that the footer will appear at the bottom of the preview area?

(I realise I could stick the header and footer in a containing table and pad out the centre cell - but is there a way that doesn't involve placing everything in a table?)

I tried adding a table with a height of 100% inbetween the header and footer but that didn't work.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
To be honest for email stationery you are best just creating a table.

Even then you may find that some mail clients will ignore any sizing you put on that middle cell.


Question. If you are creating these to a fixed size, what happens if my email message is longer than the size you (or whoever) has decided I'm working to?

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
The padding is only for preview purposes. I understand that when it actually becomes an email, the footer will just run on from the message, however for the preview it'd look better at the bottom of the window.

- Andy
___________________________________________________________________
If you think nobody cares you're alive, try missing a couple of mortgage payments
 
Try adding a div that has a height defined, or if you are using VB, try a for loop, that outputs the same set of text over and over again. To fill it up.

This would of course be for preview purposes only.

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 

try a for loop, that outputs the same set of text over and over again.

Yeah. I say go low tech and add in a bunch of:

Code:
<p>nbsp;</p>
<p>nbsp;</p>
<p>nbsp;</p>
<p>nbsp;</p>
<p>nbsp;</p>

between the header and footer.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top