Basic 3-Column

Anschauen

<!DOCTYPE html PUBLIC „-//W3C//DTD XHTML 1.0 Transitional//EN“
„http://www.w3.org/TR/xhtml11/DTD/xhtml1-transitional.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 type=„text/css“>
.content>p {
margin: 0;
}
.content>p+p {
text-indent: 30px;
}
.content {
position: relative;
width: auto;
min-width: 120px;
margin: 0 210px 20px 170px;
border: 1px solid black;
padding: 10px;
z-index: 3;
}

#navleft {
position: absolute;
width: 128px;
top: 20px;
left: 20px;
font-size: 0.9em;
border: 1px dashed black;
padding: 10px;
z-index: 2;
}

#navright {
position: absolute;
width: 168px;
top: 20px;
right: 20px;
border: 1px dashed black;
padding: 10px;
z-index: 1;
}

</style>
</head>
<body>

<div class=„content“>
<h1>header</h1>
<p>Web.</p>
<p>What?</p>
</div>

<div class=„content“>
<h2>CSS in Context</h2>
<p>their systems.</p>
</div>

<div class=„content“>
<h2>Content</h2>
<p>page.</p>
</div>

<div id=„navleft“>
<h2>Some Links</h2>
<p>
<a href=„“ title=„“>Home Page</a><br/>
<a href=„“ title=„“>Home</a><br/>
<a href=„“ title=„“>Book</a><br/>
<a href=„“ title=„“>One</a><br/>
<a href=„“ title=„“>Here</a><br/>
<a href=„“ title=„“>Nowhere</a><br/>
<a href=„“ title=„“>Four</a><br/>
<a href=„“ title=„“>Link</a><br/>
</p>
</div>

<div id=„navright“>
<h2>CSS</h2>
<p>CSS.</p>
<p>subject,
<a href=„mailto:d@d.com“>drop me an email</a></p>
</div>

</body>
</html>

Veröffentlicht in CSS, Layout. Schlagworte: , , . Kommentare sind deaktiviert

2-column with total width 922px, left width 200px, float right

Anschauen


<!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;
}
#leftcolumn {
color: #333;
border: 1px solid #ccc;
background: #F0E6F0;
margin: 10px 0px 10px 0px;
padding: 10px;
height: 500px;
width: 200px;
float: left;
}

#rightcolumn {
float: right;
color: #333;
border: 1px solid #ccc;
background: #8B3CCC;
margin: 10px 0px 10px 0px;
padding: 10px;
height: 500px;
width: 678px;
display: inline;
position: relative;
}
</style>
</head>
<body>

<div id=„wrapper“>
<div id=„leftcolumn“> Left Column 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. this is a test. this is a test.
</div>
<div id=„rightcolumn“> 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.
</div>
</div>

</body>
</html>

Veröffentlicht in CSS, Layout. Schlagworte: , . Kommentare sind deaktiviert

Two Columns Layout Using CSS

Anschauen


<?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>Two Columns Layout Using CSS</title>
<style rel="stylesheet" type="text/css">
.page {
margin-left: auto;
margin-right: auto;
width: 700px;
background-color: #ffffff;
border-style: solid;
border-width: 1px;
border-color: #666666;
}

.header {
background-color: #f3f3f3;
padding: 3px;
}

.nav {
font-weight: bold;
background-color: #e3e3e3;
padding: 5px;
float: left;
width: 100px;
height: 30em;
}

.content {
padding: 10px;
}
</style>
</head>
<body>
<div class=„page“>
<div class=„header“><h1>My Company Name</h1></div>
<div class=„nav“>
<a href=„“>Home</a><br /><a href=„“>Products</a><br /><a href=„“>Services</a><br /><a href=„“>About Us</a><br /><a href=„“>Contact Us</a>
</div>
<div class=„content“>
<h2>Sample Web Page</h2>
<p>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. </p>

</div>
</div>
</body>
</html>

Veröffentlicht in CSS, Layout. Schlagworte: , . Kommentare sind deaktiviert