Home >Web Front-end >CSS Tutorial >DIV CSS webpage alternative top-bottom layout example code_Experience exchange

DIV CSS webpage alternative top-bottom layout example code_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:04:231738browse

Let me first talk about a few problems discovered during the trial process
1. Box model problem
I believe that friends who are playing with refactoring or DIV CSS should all know this thing. I won’t talk nonsense. If you don’t know it, you are interested. You can search online. I mention this here because this layout is controlled by percentage, so after adding a 1px edge to the border, it is difficult to reduce it back. I discarded the upper border style.

2. Overflow problem
This problem can be solved by hiding the overflow to prevent the content from being too long and overflowing. At the beginning, you can add a hidden attribute to the overflow of html and body. Blank told me that IE has a scroll bar width by default (I don't know this), but FF does not (I don't know this).

That’s basically it, the code is as follows:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn