Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Absolute bottom of the page.

Reply
Thread Tools

Absolute bottom of the page.

 
 
Simon
Guest
Posts: n/a
 
      03-18-2006
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


 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      03-18-2006
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.
 
Reply With Quote
 
 
 
 
Simon
Guest
Posts: n/a
 
      03-18-2006
>
>> 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


 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      03-18-2006
> 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>
################################################## ##################


 
Reply With Quote
 
Steve Pugh
Guest
Posts: n/a
 
      03-18-2006
"Simon" <(E-Mail Removed)> 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 <(E-Mail Removed)> <http://steve.pugh.net/>
 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      03-18-2006
>>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.


 
Reply With Quote
 
Jim Moe
Guest
Posts: n/a
 
      03-18-2006
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)
 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      03-19-2006
>>>
>>> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
css "div" bottom of window or bottom of content. Dan HTML 1 04-04-2008 09:40 AM
How to keep footer always aligned absolute bottom savedumbo@gmail.com HTML 0 06-25-2007 07:53 PM
How do we know the memory arrangement using in microprocessors? Top-Bottom or Bottom-Top? Cuthbert C Programming 8 09-13-2006 12:09 PM
CSS to put text at bottom of browser window, or page bottom, whichever is lower? Noozer HTML 1 03-13-2006 10:35 AM
Using CSS to align a div to the very bottom of the page (inc. other absolute divs) Andrew HTML 1 01-12-2005 05:51 PM



Advertisments