Home Web Front-end HTML Tutorial div css layout fluid floating layout_html/css_WEB-ITnose

div css layout fluid floating layout_html/css_WEB-ITnose

Jun 24, 2016 pm 12:29 PM

FloatLayout3Cols.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>流体浮动布局2</title><link rel="stylesheet" type="text/css" href="Layer2.css" /></head><body>    <div id="header">        <h1>这里是标题</h1>    </div>    <div id="nav">        <ul>            <li>新闻</li>            <li>杂志</li>            <li>游戏</li>            <li>音乐</li>            <li>电影</li>            <li>娱乐</li>        </ul>    </div>    <div id="main">        <p>对于ASP.NET而言,开发人员不可避免的会将ASP.NET与ASP进行比较,因为ASP.NET可以算作是ASP的下一个版本。但是ASP.NET却与ASP完全不同,可以说微软重新将ASP进行编写和组织形成ASP.NET技术。 </p>        <p>在传统的ASP开发中,开发人员可以在页面中进行ASP代码的编写,当服务器请求相应的页面时,服务器会解析ASP代码进行页面呈现。ASP具有轻巧等特点,但是随着互联网的发展,ASP也越来越多的呈现出其不足之处,这些不足之处包括ASP代码无法和HTML代码很好的分离,这就造成了页面代码混乱、维护性低等情况。当ASP中出现错误或者需要进行功能的添加,就需要多大部分的页面进行更改,这样就降低了ASP程序的复用性和维护性。</p>        <p>对于ASP.NET而言,开发人员不可避免的会将ASP.NET与ASP进行比较,因为ASP.NET可以算作是ASP的下一个版本。但是ASP.NET却与ASP完全不同,可以说微软重新将ASP进行编写和组织形成ASP.NET技术。 </p>        <p>在传统的ASP开发中,开发人员可以在页面中进行ASP代码的编写,当服务器请求相应的页面时,服务器会解析ASP代码进行页面呈现。ASP具有轻巧等特点,但是随着互联网的发展,ASP也越来越多的呈现出其不足之处,这些不足之处包括ASP代码无法和HTML代码很好的分离,这就造成了页面代码混乱、维护性低等情况。当ASP中出现错误或者需要进行功能的添加,就需要多大部分的页面进行更改,这样就降低了ASP程序的复用性和维护性。 </p>        <p>相对于ASP而言,ASP.NET具有更加完善的开发工具。在传统的ASP开发中,可以使用Dreamware、FrontPage等工具进行页面开发。当时使用Dreamware、FrontPage等工具进行ASP应用程序开发时,其效率并不能提升,并且这些工具对ASP应用程序的开发和运行也不会带来性能提升。 </p>        <p>相比之下,对于ASP.NET应用程序而言,微软开发了Visual Studio开发环境提供给开发人员进行高效的开发,开发人员还能够使用现有的ASP.NET控件进行高效的应用程序开发,这些控件包括日历控件、分页控件、数据源控件和数据绑定控件。开发人员能够在Visual Studio开发环境中拖动相应的控件到页面中实现复杂的应用程序编写。 </p>    </div>    <div id="navr">        <ul>            <li>新闻</li>            <li>杂志</li>            <li>游戏</li>            <li>音乐</li>            <li>电影</li>            <li>娱乐</li>        </ul>    </div>    <div id="footer">        <p>版权所有,翻版必究</p>    </div></body></html>
Copy after login

style.css

/* CSS Document */*{    margin:0;    padding:0;}body{    margin:10px;}#header{    border:1px solid black;    height:80px;    line-height:80px;    margin-bottom:10px;    background:gray;}#header h1{    font-size:20px;    text-align:center;    height:100%;}#nav{    border:1px solid black;    height:400px;    width:20%;    float:left;    margin-bottom:10px;    background:blue;}#nav ul{    text-align:center;    list-style-type:none;}#main{    border:1px solid black;    height:400px;    width:58%;    float:left;    margin-bottom:10px;    margin-left:0.8%;}#main p{    font-size:14px;    word-spacing:2px;    line-height:150%;    text-indent:30px;}#navr{    border:1px solid black;    height:400px;    width:20%;    float:right;    margin-bottom:10px;    background:blue;}#navr ul{    text-align:center;    list-style-type:none;}#footer{    border:1px solid black;    height:80px;    clear:both;    background:silver;    line-height:80px;}#footer p{    text-align:center;    height:100%;}
Copy after login

The effect is as follows:

The disadvantage of this layout is that when you change the size of the browser window, the content will overflow the div and look ugly.

Statement of this Website
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What is the purpose of the <progress> element? What is the purpose of the <progress> element? Mar 21, 2025 pm 12:34 PM

The article discusses the HTML &lt;progress&gt; element, its purpose, styling, and differences from the &lt;meter&gt; element. The main focus is on using &lt;progress&gt; for task completion and &lt;meter&gt; for stati

Is HTML easy to learn for beginners? Is HTML easy to learn for beginners? Apr 07, 2025 am 12:11 AM

HTML is suitable for beginners because it is simple and easy to learn and can quickly see results. 1) The learning curve of HTML is smooth and easy to get started. 2) Just master the basic tags to start creating web pages. 3) High flexibility and can be used in combination with CSS and JavaScript. 4) Rich learning resources and modern tools support the learning process.

What is the purpose of the <datalist> element? What is the purpose of the <datalist> element? Mar 21, 2025 pm 12:33 PM

The article discusses the HTML &lt;datalist&gt; element, which enhances forms by providing autocomplete suggestions, improving user experience and reducing errors.Character count: 159

What is the purpose of the <meter> element? What is the purpose of the <meter> element? Mar 21, 2025 pm 12:35 PM

The article discusses the HTML &lt;meter&gt; element, used for displaying scalar or fractional values within a range, and its common applications in web development. It differentiates &lt;meter&gt; from &lt;progress&gt; and ex

What is the viewport meta tag? Why is it important for responsive design? What is the viewport meta tag? Why is it important for responsive design? Mar 20, 2025 pm 05:56 PM

The article discusses the viewport meta tag, essential for responsive web design on mobile devices. It explains how proper use ensures optimal content scaling and user interaction, while misuse can lead to design and accessibility issues.

What is the purpose of the <iframe> tag? What are the security considerations when using it? What is the purpose of the <iframe> tag? What are the security considerations when using it? Mar 20, 2025 pm 06:05 PM

The article discusses the &lt;iframe&gt; tag's purpose in embedding external content into webpages, its common uses, security risks, and alternatives like object tags and APIs.

The Roles of HTML, CSS, and JavaScript: Core Responsibilities The Roles of HTML, CSS, and JavaScript: Core Responsibilities Apr 08, 2025 pm 07:05 PM

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

What is an example of a starting tag in HTML? What is an example of a starting tag in HTML? Apr 06, 2025 am 12:04 AM

AnexampleofastartingtaginHTMLis,whichbeginsaparagraph.StartingtagsareessentialinHTMLastheyinitiateelements,definetheirtypes,andarecrucialforstructuringwebpagesandconstructingtheDOM.

See all articles