Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 278
  • Last Modified:

Getting a footer on each page

Hi All,

Well I am using the OnRequestEnd.cfm file available in cold fusion that is automatically inserted at the end of each page to attempt to have a little copyright blurb at the bottom of each page.

I have a couple of queries as regards this...

First here is the code I want to insert at the bottom of each page

<TABLE WIDTH="100%" ALIGN="CENTER" BORDER="0" CELLSPACING="0" CELLPADDING="0">
  <TR>
    <TD BGCOLOR="#0066FF" WIDTH="100%"><IMG SRC="assets/spacer.gif" BORDER="0" HEIGHT="1" WIDTH="1"></TD>
  </TR>
  <TR>
    <TD ALIGN="CENTER"><FONT COLOR="#003399" SIZE="1">Website design by <A HREF="mailto:brad">Brad</A>, 2003</FONT></TD>
  </TR>
</TABLE>

I am having a problem with this code appearing to the RIGHT of the page's contents rather than down below it!! This only happens on some pages though and not on others. The pages it does happen on are fairly simple and do not have unclosed tables etc on them.

Secondly, i was wondering if there is a way so that it appears at the very bottom of the screen instead of directly under the content (as this can look a bit funny when the page is only as high as half a page). It could either *Stay* at the bottom of the screen or better would be directly under the page if there is a scroll bar AND at the bottom of the screen if there is no scroll bar.

Thanks for reading this far!

Cheers,
Brad
0
bradderick
Asked:
bradderick
1 Solution
 
ZontarCommented:
> I am having a problem with this code appearing to the RIGHT of the page's contents rather than down below it!
Try inserting a <br clear="all"> just before the opening <table> tag.

> Secondly, i was wondering if there is a way so that it appears at the very bottom of the screen instead of directly under the content (as this can look a bit funny when the page is only as high as half a page).

That's the problem. If the document isn't long enough to take up all of the space in the browser window, then it's not long enough. About the only wasy around this is either to insert empty paragraphs or use a fixed-height table (or possibly some other container of fixed height) to encliose the whole layout. Problem then is that you end up with lots of empty space.

Or you could try some CSS: Add id="footer" to your table tag and #footer {position:absolute; bottom:5px;} add see what happens.
0
 
ZontarCommented:
(For those of you playing along at home: yes, "bottom" IS a valid CSS positioning attribute. So is "right".)

Oh... there's a bug in some browsers, I forget which ones... wrap your table in a DIV and apply the positioning to that instead:

<style type="text/css">
  #footer  {position:absolute; bottom:5px; }
</style>


<div id="footer">
  <table>
... etc.
  </table>
</div>

That should do the job.
0
 
jarasaCommented:
Hi.

You can always use a FRAME and put your copyright there, then you'll see it always at the bottoom of the browser even if the scrollbar appears.

<frameset rows="*,30" cols="100%" frameborder=0 framespacing=0>
      <FRAME NAME="Body" scrolling="no" frameborder=0 framespacing=0 marginwidth=0 marginheight=0 noresize="true" src="your_page.html">
      <frame name="Copyright" scrolling="no" frameborder=0 framespacing=0 marginwidth=0 marginheight=0 noresize="true" src="copyright.html">
      <noframes>
            No frames supported.
      </noframes>
</frameset>

Regards
Javier
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
GwynforWebCommented:
Use he style sheets , this works
<head>
<style>
<!--
body   { padding: 0px; margin: 0px; }
div.footer { position: absolute; bottom: 0px; }
//-->
</style>
</head>
<body>
<center>HELLO WORLD</center>
<div class="footer">
<TABLE WIDTH="100%"  ALIGN="CENTER" BORDER="0" CELLSPACING="0" CELLPADDING="0">
  <TR>
    <TD WIDTH="100%" ></TD>
  </TR>
  <TR>
    <TD BGCOLOR="#0066FF" WIDTH="100%"><IMG SRC="assets/spacer.gif" BORDER="0" HEIGHT="1" WIDTH="1"></TD>
  </TR>
  <TR>
    <TD ALIGN="CENTER"><FONT COLOR="#003399" SIZE="1">Website design by <A HREF="mailto:brad">Brad</A>, 2003</FONT></TD>
  </TR>
</TABLE>
<p>
</div>
</body>





0
 
GwynforWebCommented:
works fine with span instead of div as well
0
 
ZontarCommented:
>  works fine with span instead of div as well

But it wouldn't validate, as span's content-model is inline and div's is flow. span can't contain block elements.

Besides, I suggested using "bottom" first. <G>
0
 
GwynforWebCommented:
Zontar,
    Sorry some how I missed you first post. Span works fine for the suggested footer by bradderick, and I could not get any block elements to cause problems with it either.
0
 
bradderickAuthor Commented:
Thought this was accepted ages ago. My apologies Zontar for the extremely long wait for points!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now