本文介绍了一页上有四个div?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要布置一个包含五个主要元素的页面:顶部的固定div

包含导航栏,两个并排列,一个集中购物

购物车在底部,一个全窗固定div提供边框。

测试页面位于




导航栏和绝对定位的并排列看起来很好

罚款(有一些化妆品问题将在稍后处理)但是我不知道如何将购物车放在两列之下

(不在底部窗口,在页面的底部,无论页面的长度是多少,这有望随着它们发布更多

记录而增长!)


任何提示?


Pierre

-

Pierre Jelenc |内政部新闻:Ethan Lipton

|

千分表|辣椒地球:HO博客
|


I need to lay out a page with five main elements: A fixed div at the top
containing a navigation bar, two side-by-side columns, a centered shopping
cart at the bottom, and a full-window fixed div to provide a border. A
test page is at

http://www.marcvonem.com/discography.html

The navigation bar and absolutely positioned side by side columns look
fine (with a few cosmetic problems that will be dealt with later) but I
cannot figure out how to place the shopping cart under the two columns
(not at the bottom of the window, at the bottom of the page regardless of
the length of the page, which hopefully will grow as they release more
records!)

Any hints?

Pierre
--
Pierre Jelenc | New on Home Office Records: Ethan Lipton
| www.homeofficerecords.com www.ethanlipton.com
The Gigometer | Pepper Of The Earth: the HO blog
www.gigometer.com | www.homeofficerecords.com/blog

推荐答案




主要内容不占用空间,因为它绝对定位。

这就是为什么推车div不够低。也许把它放在主要的

div中,或者改变主要是相对的。如果你知道

内容的高度,你可以用这个数量抵消它,但是你不想知道

的高度因为你说的那样应该成长。

HTH

Ivo



The main content is not taking up space because it is absolutely positioned.
That is why the cart div is not low enough. Perhaps place it inside the main
div, or alter the main to be relative. If you knew the height of your
content, you could offset it with that amount, but you don''t want to know
the height because as you say, that should grow.
HTH
Ivo





摆脱绝对定位。


#discoleft {float:left;}

#discoright {float:right;}

形式{clear:both;}


轻松一个。


-

Karl Smith。

临时总统,

国际全球世界Jonathon Frakes

绝不能再次在电影中出现!社会



Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}

Easy one.

--
Karl Smith.
Interim President,
International Global World "Jonathon Frakes
must never work in films again!" Society




摆脱绝对定位。

#discoleft {float:left; }
#discoright {float:right;}
形式{clear:both;}

轻松一个。



Get rid of that absolute positioning.

#discoleft {float: left;}
#discoright {float: right;}
form {clear: both;}

Easy one.




一般来说,似乎最好从相对定位开始,只有

去绝对定位如果设计需要它...很多人

似乎工作相反,我'我不完全确定为什么......我错过了什么?b $ b我错过了吗?


-

eric


这些年来我'等待革命

我们最终获得的是旋转



in general it seems best to start by using relative positioning, and only
go to absolute positioning if the design requires it...a lot of people
seem to work the other way around and I''m not entirely sure why...what am
I missing?

--
eric
www.ericjarvis.co.uk
all these years I''ve waited for the revolution
and all we end up getting is spin


这篇关于一页上有四个div?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 18:28