开发者

floated div, height 100, container fluid height [closed]

It's difficult to tell what is being开发者_运维问答 asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago.

I have this design which I cannot seem to get right, I would like .sidebar (float:left) to fill the entire height of .page-container which has a fluid height due to the content. How do I go about this?


Drop the margin-bottom and margin-left on .page-top and remove the margin-left from .sidebar. Once you do this, you have a lot of empty space at the top of .page-container but I don't understand your layout enough to comment on what to do about that; no offense, but you have a lot of empty <div> elements which I don't understand, and which are in turn causing you to abuse margins in my opinion, only making your layout harder to understand and work with.

Then you'll be ready to use the Faux columns trick described in the possible duplicate. The heart of the idea is .sidebar doesn't stretch all the way, but .page-container has a background which creates the impression it does.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜