|
Posted by Ben C on 06/12/07 17:43
On 2007-06-12, Eric C. <eric@notarealaddy.com> wrote:
> Ben C wrote:
>> On 2007-06-12, Eric C. <eric@notarealaddy.com> wrote:
>>> Hello
>>>
>>> In the old days, in quirks mode, it was possible to get content to
>>> appear at the bottom of the browser window by doing this:
>>>
>>> <table width="100%" height="100%">
>>> <tr valign="top">
>>> <td>foo</td>
>>> </tr>
>>> <tr valign="bottom">
>>> <td>bar</td>
>>> </tr>
>>> </table>
>>>
>>> Is there a way to do this using div elements and CSS?
>>
>> Use position: absolute in conjunction with bottom: 0 on a box near the
>> top of the document tree (so that the viewport is its containing block).
>>
>> e.g.
>>
>> <body>
>> ...
>> <div style="position: absolute; bottom: 0">bar</div>
>> </body>
>
> Thanks for answering. The only problem with this method is that the div
> does not move down if the content above happens to exceed the height of
> the viewport.
You can position the footer relative to body rather than relative to the
viewport. To do that just make body position: relative.
Navigation:
[Reply to this message]
|