wordpress CSS问题:页脚与侧边栏重叠

之前的blog有这样的问题,即页脚和侧边栏总是重叠在一起。一直也没有引起重视,直到今天被人笑话,赶紧定下心来修复。

症状如图:

CSS-foot-crash.png

我的CSS的footer里面设定了clear: both;,应该能够实现对齐了,怎么没有起作用呢?根据CSS手册,clear可以起到浮动对齐的效果:

CSS position-code.png
CSS position layout.png

仔细查看发现了这句position: absolute;去掉之后问题就解决了!

效果:

CSS foot-correct.png

呵呵,不敢鼓吹“追求完美”了。

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s