Absolute bottom of the page.

Discussion in 'HTML' started by Simon, Mar 18, 2006.

  1. Simon

    Simon Guest

    Hi,

    We have a website, (blog site), where users can create/use their own
    templates.

    We want to add a disclaimer and a link at the very bottom of the page.
    I thought of adding the html just before the </body> but with css that does
    not always mean that it will be at the very bottom of the page.

    Is there a way of inserting a disclaimer that will appear at the footer of
    the page?
    That is of course assuming that there are no errors in the templates

    all the templates have a basic
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>

    structure,

    Many thanks

    Simon
     
    Simon, Mar 18, 2006
    #1
    1. Advertising

  2. Simon

    Neredbojias Guest

    With neither quill nor qualm, Simon quothed:

    > Hi,
    >
    > We have a website, (blog site), where users can create/use their own
    > templates.
    >
    > We want to add a disclaimer and a link at the very bottom of the page.
    > I thought of adding the html just before the </body> but with css that does
    > not always mean that it will be at the very bottom of the page.


    It does if you use the proper css for what you want. (Of course, this
    depends on how you define "page" above.)

    > Is there a way of inserting a disclaimer that will appear at the footer of
    > the page?


    Simply make it the last item before the body closing tag and don't
    position it. Now, if you're talking about a "footer" that remains at
    the bottom of the _viewport_, that's another matter.

    --
    Neredbojias
    Contrary to popular belief, it is believable.
     
    Neredbojias, Mar 18, 2006
    #2
    1. Advertising

  3. Simon

    Simon Guest

    >
    >> Hi,
    >>
    >> We have a website, (blog site), where users can create/use their own
    >> templates.
    >>
    >> We want to add a disclaimer and a link at the very bottom of the page.
    >> I thought of adding the html just before the </body> but with css that
    >> does
    >> not always mean that it will be at the very bottom of the page.

    >
    > It does if you use the proper css for what you want. (Of course, this
    > depends on how you define "page" above.)


    I mean, whatever the user enters in their CSS, (position:absolute or fixed
    and so on)
    I want to be at the bottom of the page.
    The last item a user would see after scrolling to the bottom of a page.

    >
    >> Is there a way of inserting a disclaimer that will appear at the footer
    >> of
    >> the page?

    >
    > Simply make it the last item before the body closing tag and don't
    > position it. Now, if you're talking about a "footer" that remains at
    > the bottom of the _viewport_, that's another matter.


    No, that would be the bottom of the screen I guess.
    I mean the bottom of the whole page, regardless how much there is in it.

    something like, (everything is inline for the sake of keeping it short).

    <div style="background: #ddd; display: block;height: 100%;width:
    100%;padding: 0;margin: 0;border: 0;float: right;"></div>
    <div style="display: block;clear: both;width: 95%;padding: 1;margin:
    1;text-align: center;">
    <br />
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA<br />
    </div>

    But that does not always work.
    I just want to be at the very bottom of the page, (not the screen),
    regardless of the size of the page.

    Simon
     
    Simon, Mar 18, 2006
    #3
  4. Simon

    Simon Guest

    > With neither quill nor qualm, Simon quothed:
    >
    >> Hi,
    >>
    >> We have a website, (blog site), where users can create/use their own
    >> templates.
    >>
    >> We want to add a disclaimer and a link at the very bottom of the page.
    >> I thought of adding the html just before the </body> but with css that
    >> does
    >> not always mean that it will be at the very bottom of the page.

    >
    > It does if you use the proper css for what you want. (Of course, this
    > depends on how you define "page" above.)
    >
    >> Is there a way of inserting a disclaimer that will appear at the footer
    >> of
    >> the page?

    >
    > Simply make it the last item before the body closing tag and don't
    > position it. Now, if you're talking about a "footer" that remains at
    > the bottom of the _viewport_, that's another matter.
    >


    Here is an example of what a user could do, perfectly legal css.
    Because I am serving '000s of pages at a time I just want to insert one
    block of code before the </body> that will ensure that the code is at the
    very bottom of the page.

    As you can see my footer is not at the bottom.

    ####################################################################
    <HTML>
    <HEAD>
    <title>Test</title>

    </HEAD>
    <body >

    <div id="Layer2" style="position:absolute; left:408px; top:420px;
    width:377px; z-index:3;">
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />
    Body<br />

    </div>

    <div style="display: block;clear: both;width: 95%;padding: 1;margin:
    1;text-align: center;">
    <br />
    ----------------------------------Footer----------------------------------<br
    />
    ----------------------------------Footer----------------------------------<br
    />
    ----------------------------------Footer----------------------------------<br
    />
    ----------------------------------Footer----------------------------------<br
    />

    </script>
    </body>
    </HTML>
    ####################################################################
     
    Simon, Mar 18, 2006
    #4
  5. Simon

    Steve Pugh Guest

    "Simon" <> wrote:

    >As you can see my footer is not at the bottom.


    ><div id="Layer2" style="position:absolute; left:408px; top:420px;
    >width:377px; z-index:3;">


    And this is why. Absolutely positioned elements are taken out of the
    document flow and hence are not taken into consideration when laying
    out the rest of the page. If your absolutely positioned element
    contains flexible content (i.e. any text) you can't give it a fixed
    height. Hence you can't know how tall it will be and hence you can't
    reliably position anything below it on the page.

    So if you want a footer, you need to stop using absolute positioning.

    Steve
    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
     
    Steve Pugh, Mar 18, 2006
    #5
  6. Simon

    Simon Guest

    >>As you can see my footer is not at the bottom.
    >
    >><div id="Layer2" style="position:absolute; left:408px; top:420px;
    >>width:377px; z-index:3;">

    >
    > And this is why. Absolutely positioned elements are taken out of the
    > document flow and hence are not taken into consideration when laying
    > out the rest of the page. If your absolutely positioned element
    > contains flexible content (i.e. any text) you can't give it a fixed
    > height. Hence you can't know how tall it will be and hence you can't
    > reliably position anything below it on the page.
    >
    > So if you want a footer, you need to stop using absolute positioning.
    >


    That is a problem, I cannot ask my users to stop using absolute positioning.

    It might be a long shot, but would JavaScript be able to tell me the height
    of a document so I can position the footer using absolute position myself.

    Would you know if JavaScript can do that?

    Simon.
     
    Simon, Mar 18, 2006
    #6
  7. Simon

    Jim Moe Guest

    Simon wrote:
    >>
    >> So if you want a footer, you need to stop using absolute positioning.

    >
    > That is a problem, I cannot ask my users to stop using absolute positioning.
    >

    If you give control of the layout to the users, you cannot control the
    layout.

    > It might be a long shot, but would JavaScript be able to tell me the height
    > of a document so I can position the footer using absolute position myself.
    >
    > Would you know if JavaScript can do that?
    >

    Yes, it can. If the user has JS enabled. And you have given the
    container an "id" attribute. Look up getElementById().

    --
    jmm (hyphen) list (at) sohnen-moe (dot) com
    (Remove .AXSPAMGN for email)
     
    Jim Moe, Mar 18, 2006
    #7
  8. Simon

    Simon Guest

    >>>
    >>> So if you want a footer, you need to stop using absolute positioning.

    >>
    >> That is a problem, I cannot ask my users to stop using absolute
    >> positioning.
    >>

    > If you give control of the layout to the users, you cannot control the
    > layout.


    Really? As a programmer I find it hard to believe.

    >
    >> It might be a long shot, but would JavaScript be able to tell me the
    >> height
    >> of a document so I can position the footer using absolute position
    >> myself.
    >>
    >> Would you know if JavaScript can do that?
    >>

    > Yes, it can. If the user has JS enabled. And you have given the
    > container an "id" attribute. Look up getElementById().


    Seen that 99% of my users have JS enabled I have gone down this route.
    I am using <noscript> to simply not put anything at all in that case, the
    numbers are so small that I will do that for now.

    Simon
     
    Simon, Mar 19, 2006
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dan
    Replies:
    1
    Views:
    8,403
    ainigma
    Apr 4, 2008
  2. Andrew
    Replies:
    1
    Views:
    3,606
    Travis Newbury
    Jan 12, 2005
  3. Noozer
    Replies:
    1
    Views:
    7,226
    Carolyn Marenger
    Mar 13, 2006
  4. Cuthbert
    Replies:
    8
    Views:
    454
    Ancient_Hacker
    Sep 13, 2006
  5. Replies:
    0
    Views:
    601
Loading...

Share This Page