Home >Web Front-end >HTML Tutorial >Classic DIV CSS case--two columns height adaptive_html/css_WEB-ITnose

Classic DIV CSS case--two columns height adaptive_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:30:211299browse

I believe many people like to use div css layout very much, whether you are a front-end developer or a back-end programmer, because it has so many benefits and you can control the layout with very little code. Then use CSS to express its form, and separate presentation and style. And in terms of SEO, it can also provide 30% optimization, so why not do it.

Many people will encounter layout problems like the title. There are many solutions. You can use background images to fill it, or use js to control it, but it is not the best solution in the end. It is best to consider DIV and CSS itself. ; html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Two columns are height-adaptive







< div id="main">




I am in the main text

I am in the main text

I am in the main text

I am in the main text< ;br />
I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text
I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text

I am in the main text


 














With renderings:




This solution has been tested under IE6, IE7, IE8, and FF. Although it is simple, it is widely used. I hope it will be helpful to the majority of web standards enthusiasts

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
Previous article:DIV Commonly used writing specifications for CSS web page layout_html/css_WEB-ITnoseNext article:DIV Commonly used writing specifications for CSS web page layout_html/css_WEB-ITnose

Related articles

See more