HTML/CSS/Layout/One Column
Содержание
- 1 1 column, header, content, footer
- 2 Article layout
- 3 Header
- 4 Header
- 5 Header header header header header</h2> </div> small column. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. </body> </html> </source> Liquid Design in CSS
- 6 <a href="">this is a test. </a>
- 7 <a href="">this is a test. </a>
- 8 My Company Name
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css">
- outer {
min-height: 100%; width: 612px; background: #eee; position: relative;
}
- html #outer {
height: 100%
}
- header {
border: 1px solid #000; background: #ccc; height: 40px;
}
- footer {
position: absolute; bottom: 0; left: 0; background: #bbb; height: 40px; border-top: 1px solid #000; width: 98%;
}
- clearfooter {
clear: both; height: 40px;
} </style> </head> <body>
Content
Content
</body> </html>
</source>
Article layout
<source lang="html4strict">
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <title>The Effect of the Internet on Psychological Theories of Self</title> <style rel="stylesheet" type="text/css">
body {
background-color: #000000;
} div.page {
width: 650px; border-style: solid; border-width: 1px; border-color: #666;
} div.heading {
background-color: #999; padding: 10px;
} div.body {
background-color: #EFEFEF; padding: 10px;
} h1 {
font-size: 22pt; color: #000066;
} h2 {
font-size: 18pt; color: #000066;
} p {
font-size: 14pt; color: #000000;
} </style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> </head> <body>
Header
Abstract
identity.
This is a test. This is a test. .
...
</body>
</html>
</source>
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Splash page layout</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style rel="stylesheet" type="text/css">
- wrapper {
border: 1px solid #033; position: relative;
}
body#cols3 #navigation {
position: absolute; top: 6.8em; left: 0;
} body#cols3 #related {
position: absolute; top: 6.8em; right: 10px;
}
- navigation ul,#related h2 {
margin-top: 0; padding-top: 0;
}
- footer {
padding: 5px 0 5px 160px; clear: both; background: #D9FFF8; font-size: 0.8em; color: #030;
} </style> </head> <body id="splash">
Header
Header 2
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
this is a test. this is a test.
</body> </html>
</source>
Header with one column under
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> body {
width: 600px; border-right: 1px solid black;
}
- header {
background-color: #666; border-bottom: 1px solid #333;
}
- columnLeft {
float: left; width: 160px; margin-left: 10px; padding-top: 1em;
}
- columnRight {
padding-top: 1em; margin: 0 2em 0 200px;
}
- footer {
clear: both; background-color: #ccc; padding-bottom: 1em; border-top: 1px solid #333; padding-left: 200px;
} </style> </head>
<body>
Header header header header header</h2>
</div>
small column.
This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text.
</body>
</html>
</source>
Liquid Design in CSS
small column.
This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text.
This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text. This is a text.
<source lang="html4strict">
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitionalt//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <title>Liquid Design in CSS</title> <style rel="stylesheet" type="text/css">
div#page {
width: 95%; background-color: #ffffff; border-style: solid; border-width: 1px; border-color: #666666; padding: 20px; font-size: 12px;
} </style>
</head> <body>
<h1>Sample Web Page</h1>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eleifend, erat id commodo placerat, nulla purus bibendum justo, in dictum orci mi vitae nulla. Nullam semper viverra nulla. Sed lacinia feugiat eros. Maecenas ullamcorper ligula quis odio. Donec pede massa, pharetra sit amet, accumsan a, iaculis egestas, lectus. Etiam ullamcorper elementum wisi. Etiam et felis aliquet dui tempus sagittis. Donec dapibus ipsum id leo. Integer est ante, imperdiet non, suscipit sit amet, varius a, sem. Integer lobortis wisi id erat. Nullam aliquet augue ac elit. Nulla facilisi. Vivamus ligula tortor, molestie at, accumsan quis, semper vitae, augue. Praesent pede neque, sollicitudin non, facilisis sed, viverra a, pede. Cras nec urna. Curabitur ut metus. Curabitur erat lacus, tempus vitae, elementum nec, pulvinar vel, leo. Sed a velit. Proin erat. Donec sem.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eleifend, erat id commodo placerat, nulla purus bibendum justo, in dictum orci mi vitae nulla. Nullam semper viverra nulla. Sed lacinia feugiat eros. Maecenas ullamcorper ligula quis odio. Donec pede massa, pharetra sit amet, accumsan a, iaculis egestas, lectus. Etiam ullamcorper elementum wisi. Etiam et felis aliquet dui tempus sagittis. Donec dapibus ipsum id leo. Integer est ante, imperdiet non, suscipit sit amet, varius a, sem. Integer lobortis wisi id erat. Nullam aliquet augue ac elit. Nulla facilisi. Vivamus ligula tortor, molestie at, accumsan quis, semper vitae, augue. Praesent pede neque, sollicitudin non, facilisis sed, viverra a, pede. Cras nec urna. Curabitur ut metus. Curabitur erat lacus, tempus vitae, elementum nec, pulvinar vel, leo. Sed a velit. Proin erat. Donec sem.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eleifend, erat id commodo placerat, nulla purus bibendum justo, in dictum orci mi vitae nulla. Nullam semper viverra nulla. Sed lacinia feugiat eros. Maecenas ullamcorper ligula quis odio. Donec pede massa, pharetra sit amet, accumsan a, iaculis egestas, lectus. Etiam ullamcorper elementum wisi. Etiam et felis aliquet dui tempus sagittis. Donec dapibus ipsum id leo. Integer est ante, imperdiet non, suscipit sit amet, varius a, sem. Integer lobortis wisi id erat. Nullam aliquet augue ac elit. Nulla facilisi. Vivamus ligula tortor, molestie at, accumsan quis, semper vitae, augue. Praesent pede neque, sollicitudin non, facilisis sed, viverra a, pede. Cras nec urna. Curabitur ut metus. Curabitur erat lacus, tempus vitae, elementum nec, pulvinar vel, leo. Sed a velit. Proin erat. Donec sem.
</body>
</html>
</source>
One column: header, content
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style rel="stylesheet" type="text/css">
- wrapper {
width: 922px;
}
- header {
width: 900px; color: #333; border: 1px solid #ccc; height: 100px; background-color:#F3F2ED;
}
- content {
width: 900px; color: #333; border: 1px solid #ccc; background:#eee; height: 350px;
} </style> </head> <body>
</body> </html>
</source>
<source lang="html4strict">
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css">
- content {
padding: 10px; margin-top: 5px; margin-bottom: 0px; margin-right: auto; margin-left: auto; background-color: #fff; border: 1px solid #000; width: 70%;
}
- navBar {
padding: 0px 10px 0px 10px; margin-top: 0px; margin-bottom: 5px; margin-right: auto; margin-left: auto; background-color: #fff; border-top: 0px; border-bottom: 1px solid #000; border-left: 1px solid #000; border-right: 1px solid #000; width: 70%; text-align: right;
}
</style>
</head>
<body>
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
</body> </html>
</source>
<source lang="html4strict">
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css">
- content {
padding: 20px 10px 10px 80px; margin-top: 5px; margin-bottom: 5px; margin-right: auto; margin-left: auto; background-color: #fff; border: 1px solid #000; width: 70%;
}
- navBar {
padding: 0px 10px 0px 10px; margin-top: 0px; margin-bottom: 5px; margin-right: auto; margin-left: auto; background-color: #fff; border-top: 1px solid #000; border-bottom: 1px solid #000; border-left: 1px solid #000; border-right: 1px solid #000; width: 70%; text-align: right;
}
</style>
</head>
<body>
this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test. this is a test.
</body>
</html>
</source>
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <title>positioning</title> <style rel="stylesheet" type="text/css">
h1 {
position: absolute; top: 0; right: 0; left: 0; height: 20px; border-bottom: 1px solid red; background: white;
} div#container {
position: absolute; top: 31px; right: 0; bottom: 31px; left: 0; overflow: auto; padding: 0 10px;
} div#footer {
position: absolute; bottom: 0; right: 0; left: 0; height: 20px; border-top: 1px solid blue; background: white;
}
</style> </head> <body><h1>A Fixed Heading
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec eu Aenean dictum dolor ut sem.
Ut commodo. Sed non nisi at leo aliquet lobortis. Donec a elit vel conubia nostra, per inceptos hymenaeos.
</body>
</html>
</source>
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style rel="stylesheet" type="text/css">
- header {
width: 900px; padding: 10px; border: 1px solid #ccc; height: 250px; margin: 10px 0px 5px 0px; background-color:#F3F2ED;
}
- footer {
width: 900px; border: 1px solid #ccc; background: #DAC8BF; margin: 0px 0px 10px 0px; padding: 10px; height: 250px;
} </style> </head> <body>
<a href="">this is a test. </a>
</body> </html>
</source>
One column with two DIV section
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css" media="screen">
- wrapper {
width: 922px;
}
- header {
width: 900px; color: #333; padding: 10px; border: 1px solid #ccc; height: 100px; margin: 10px 0px 5px 0px; background-color:#F3F2ED;
}
- content {
width: 900px; color: #333; border: 1px solid #ccc; background:#eee; margin: 0px 0px 10px 0px; padding: 10px; height: 350px;
}
</style>
</head> <body>
<a href="">this is a test. </a>
</body> </html>
</source>
Single column
<source lang="html4strict">
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>1 Column </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style rel="stylesheet" type="text/css" >
- wrapper {
width: 922px;
}
- content {
width: 900px; color: #333; border: 1px solid #ccc; background:#CCC8B3; margin: 10px 0px 10px 0px; padding: 10px; height: 500px;
} </style> </head> <body>
</body> </html>
</source>
Single Columns with CSS
<source lang="html4strict">
<?xml version="1.0" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitionalt//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <title>Single Columns CSS</title> <style rel="stylesheet" type="text/css">
.page {
width: 700px; font-size: 12px; background-color: #ffffff; border-style: solid;
} .nav {
font-weight: bold; background-color: #e3e3e3; padding: 5px;
} .content {
padding: 10px;
} </style>
</head> <body>
My Company Name
Sample Web Page
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc eleifend, erat id commodo placerat, nulla purus bibendum justo, in dictum orci mi vitae nulla. Nullam semper viverra nulla. Sed lacinia feugiat eros. Maecenas ullamcorper ligula quis odio. Donec pede massa, pharetra sit amet, accumsan a, iaculis egestas, lectus. Etiam ullamcorper elementum wisi. Etiam et felis aliquet dui tempus sagittis. Donec dapibus ipsum id leo. Integer est ante, imperdiet non, suscipit sit amet, varius a, sem. Integer lobortis wisi id erat. Nullam aliquet augue ac elit. Nulla facilisi. Vivamus ligula tortor, molestie at, accumsan quis, semper vitae, augue. Praesent pede neque, sollicitudin non, facilisis sed, viverra a, pede. Cras nec urna. Curabitur ut metus. Curabitur erat lacus, tempus vitae, elementum nec, pulvinar vel, leo. Sed a velit. Proin erat. Donec sem.
</body>
</html>
</source>
<source lang="html4strict">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css">
- outer{
min-height:100%; width:612px; position:relative;
}
- header {
background:#aaa; height:40px; margin-left:6px; margin-right:6px;
}
- footer {
position:absolute; bottom:0; left:0; background:#ccc; height:40px; width:98%;
}
- clearfooter{
clear:both; height:40px;
} </style> </head> <body>
Content
</body> </html>
</source>