强制不在页面顶部的浮动元素停在页面底部 [英] Coercing a floating element that's not at the page's top to stop at the page's bottom

查看:62
本文介绍了强制不在页面顶部的浮动元素停在页面底部的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


是否有可能将浮动元素(如果是DIV)的底部移动到

动态调整自己即使浮动元素不在页面的顶部,它基本上会附加到页面的底部吗?请

看到这个插图我已经做过;它将显示网站的布局:

http://www.2and2.net/Uploads/Images/...float-help.png


我不能使用百分比因为顶部的标题是固定大小。


将DIV的高度设置为100%会导致它自己设置为整个长度

页面,所以它变得太长了。我尝试在一个带有类

声明的DIV中将所有内容(即菜单,内容和页脚)下面的所有内容包含在内,但100%似乎仍然是设置为

整页的长度。


我希望我能很好地解释自己。我能得到任何指导吗?我先b / b $ / /渲染菜单,让它跨越页面左边的整个长度,并将内部上边距设置为高度

标题,但这似乎是陪审团操纵的。

-

J44xm< http://j44xm.notlong.com> < br>

解决方案

J44xm写道:

大家好。

是否有可能获得最低点一个浮动元素(如果是一个DIV)动态调整自己,使它基本上附加到页面的底部,即使浮动元素不在页面的顶部?请
看看我做过的这个插图;它将显示网站的布局:

http://www.2and2.net/Uploads/Images/...float-help.png

我不能使用百分比顶部是固定尺寸。

将DIV的高度设置为100%会使其自身设置为整个页面的长度,因此它变得太长。我尝试在一个带有类
声明的DIV中将标题下面的所有内容(即菜单,内容和页脚)包含在内,但100%似乎仍设置为
我希望我能很好地解释自己。我能得到任何指导吗?我首先/可以/渲染菜单,让它跨越页面左侧的整个长度,并将内部上边距设置为
标题的高度,但是似乎是陪审团操纵的。




这有用吗?...


< style type =" text / css">

#foot {position:absolute; bottom:0px; right:0px;}

< / style>

。 ...


< div id =" foot">我的脚气味< / div>


-

在线订购牛肉干:
http:// www.choicebeefjerky.com.au/order_online.html

不是牛肉干的网站: http://mycoolfish.com/vote.cmks

尽可能经常光脚


[Disco Octopus];星期四,2005年7月14日05:28:15 GMT]

这有用吗?...

< style type =" text / css" >
#foot {position:absolute; bottom:0px; right:0px;}
< / style>




''门票:我需要让该部分的位置绝对。我应该意识到这一点,但是我想,出于某种原因,这样做会导致页面的流动。非常感谢你的帮助。

-

J44xm< http://j44xm.notlong.com>


[" J44xm英寸;星期四,2005年7月14日18:48:58 GMT]

这是票:我需要让该部分的位置绝对。我应该已经意识到这一点,但出于某种原因,我正在考虑这样做会导致页面流失。非常感谢你的帮助。




更新:看来我的绝对定位计划在IE中不起作用。不幸的是,

需要对IE友好。还有其他想法吗?

-

J44xm< http://j44xm.notlong.com>


Hello, folks.

Is it possible to get the bottom of a floating element (in case, a DIV) to
dynamically adjust itself so that it essentially attaches to the bottom of
the page, even if the floating element is not at the top of the page? Please
see this illustration I''ve made; it will show the layout of the site:

http://www.2and2.net/Uploads/Images/...float-help.png

I can''t use percentages since the header at the top is fixed size.

Setting the height of the DIV to 100% causes it to set itself to the length
of the entire page, so it becomes too long. I tried encasing everything
below the header (i.e., the menu, content, and footer) in a DIV with a class
declaration, but 100% still seems to have been set to the length of the
entire page.

I hope I''m explaining myself suitably well. Can I get any guidance? I
/could/ render the menu first, have it span the entire length of the left
side of the page, and set the internal top margin to the height of the
header, but that seems fairly jury-rigged.
--
J44xm <http://j44xm.notlong.com>

解决方案

J44xm wrote :

Hello, folks.

Is it possible to get the bottom of a floating element (in case, a DIV) to
dynamically adjust itself so that it essentially attaches to the bottom of
the page, even if the floating element is not at the top of the page? Please
see this illustration I''ve made; it will show the layout of the site:

http://www.2and2.net/Uploads/Images/...float-help.png

I can''t use percentages since the header at the top is fixed size.

Setting the height of the DIV to 100% causes it to set itself to the length
of the entire page, so it becomes too long. I tried encasing everything
below the header (i.e., the menu, content, and footer) in a DIV with a class
declaration, but 100% still seems to have been set to the length of the
entire page.

I hope I''m explaining myself suitably well. Can I get any guidance? I
/could/ render the menu first, have it span the entire length of the left
side of the page, and set the internal top margin to the height of the
header, but that seems fairly jury-rigged.



is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>
....

<div id="foot">my feet smell</div>

--
order beef jerky online :
http://www.choicebeefjerky.com.au/order_online.html
not a beef jerky web site : http://mycoolfish.com/vote.cmks
go bare foot as often as possible


["Disco Octopus"; Thu, 14 Jul 2005 05:28:15 GMT]

is this helpfull?...

<style type="text/css">
#foot {position:absolute;bottom:0px;right:0px;}
</style>



That''s the ticket: I needed to make the section''s positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page''s flow. Thanks very much for your help.
--
J44xm <http://j44xm.notlong.com>


["J44xm"; Thu, 14 Jul 2005 18:48:58 GMT]

That''s the ticket: I needed to make the section''s positioning absolute. I
should have realized this, but I was thinking, for some reason, that doing
this would throw off the page''s flow. Thanks very much for your help.



Update: It seems my absolute-positioning plan doesn''t work in IE. This,
unfortunately, needs to be IE-friendly. Any other ideas?
--
J44xm <http://j44xm.notlong.com>


这篇关于强制不在页面顶部的浮动元素停在页面底部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆