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)

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.

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.

Understanding HTML, CSS, and JavaScript: A Beginner's Guide Understanding HTML, CSS, and JavaScript: A Beginner's Guide Apr 12, 2025 am 12:02 AM

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Gitee Pages static website deployment failed: How to troubleshoot and resolve single file 404 errors? Apr 04, 2025 pm 11:54 PM

GiteePages static website deployment failed: 404 error troubleshooting and resolution when using Gitee...

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.

How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? Apr 05, 2025 am 06:15 AM

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

HTML, CSS, and JavaScript: Essential Tools for Web Developers HTML, CSS, and JavaScript: Essential Tools for Web Developers Apr 09, 2025 am 12:12 AM

HTML, CSS and JavaScript are the three pillars of web development. 1. HTML defines the web page structure and uses tags such as, etc. 2. CSS controls the web page style, using selectors and attributes such as color, font-size, etc. 3. JavaScript realizes dynamic effects and interaction, through event monitoring and DOM operations.

How to implement adaptive layout of Y-axis position in web annotation? How to implement adaptive layout of Y-axis position in web annotation? Apr 04, 2025 pm 11:30 PM

The Y-axis position adaptive algorithm for web annotation function This article will explore how to implement annotation functions similar to Word documents, especially how to deal with the interval between annotations...

See all articles