Post by noman on Feb 7, 2007 7:22:51 GMT -5
How to use this template
Live Template preview
1.Create a new folder, and open up a text editor (Notepad), and copy (Ctrl+C) and paste (Ctrl+V) the template code. then save (Inside the new folder) the document as a .html file.
2. To view the template open up your browser and go to File > Open (Open File in Fire Fox)
3. To create an external stylesheet copy and paste all the css contained in the <style> tags. Create another document and save (Inside the new folder), as style.css
You do not need to use style tags in the external stylesheet.
Adding content to the template
All tags (elements), must be closed...
<p></p>
<blockquote></blockquote>
<div></div>
...or self closed
<br />
<hr />
<img src="" alt="" />
Text
1. All text should be contained in <p> (paragraph) tags.
<p>Example of a paragraph</p>
2. Quotes should be enclosed in both Blockquote and Paragraph tags
<blockquote><p>Example of a quote</p></blockquote>
Images
1. Image tags should contain the alt attribute, to give an alternative text description if the image fails to load.
<img src="http://img.jpg" alt="my image" />
2. Images should be enclosed in <div> tags.
<div><img src="http://img.jpg" alt="my image"/></div>
3. You can also add some caption text to the image, enclosed in <p> tags.
<div><img src="http://img.jpg" alt="my image" /><p>caption</p></div>
4. To align the image on the left of the page add:
<div><img class="imgfl" src="http://img.jpg" alt="my image" /><p>caption</p></div>
5. To align the image on the right of the page add:
<div><img class="imgfr" src="http://img.jpg" alt="my image" /><p>caption</p></div>
Navigation and side bar Links
These links are treated as list items (<li>) inside ordered lists (<ol>). To add more links, add another list item to the list:
<ol>
<li><a href="">Link one</a></li>
<li><a href="">Link two</a></li>
<li><a href="">Link three</a></li>
<li><a href="">Link four</a></li>
<li><a href="">Another Link</a></li>
</ol>
Hope that helps. Anyway, here's the code... ;D
If you are having any further difficulties, or want to modify the template, let me know
Live Template preview
1.Create a new folder, and open up a text editor (Notepad), and copy (Ctrl+C) and paste (Ctrl+V) the template code. then save (Inside the new folder) the document as a .html file.
2. To view the template open up your browser and go to File > Open (Open File in Fire Fox)
3. To create an external stylesheet copy and paste all the css contained in the <style> tags. Create another document and save (Inside the new folder), as style.css
You do not need to use style tags in the external stylesheet.
Adding content to the template
All tags (elements), must be closed...
<p></p>
<blockquote></blockquote>
<div></div>
...or self closed
<br />
<hr />
<img src="" alt="" />
Text
1. All text should be contained in <p> (paragraph) tags.
<p>Example of a paragraph</p>
2. Quotes should be enclosed in both Blockquote and Paragraph tags
<blockquote><p>Example of a quote</p></blockquote>
Images
1. Image tags should contain the alt attribute, to give an alternative text description if the image fails to load.
<img src="http://img.jpg" alt="my image" />
2. Images should be enclosed in <div> tags.
<div><img src="http://img.jpg" alt="my image"/></div>
3. You can also add some caption text to the image, enclosed in <p> tags.
<div><img src="http://img.jpg" alt="my image" /><p>caption</p></div>
4. To align the image on the left of the page add:
<div><img class="imgfl" src="http://img.jpg" alt="my image" /><p>caption</p></div>
5. To align the image on the right of the page add:
<div><img class="imgfr" src="http://img.jpg" alt="my image" /><p>caption</p></div>
Navigation and side bar Links
These links are treated as list items (<li>) inside ordered lists (<ol>). To add more links, add another list item to the list:
<ol>
<li><a href="">Link one</a></li>
<li><a href="">Link two</a></li>
<li><a href="">Link three</a></li>
<li><a href="">Link four</a></li>
<li><a href="">Another Link</a></li>
</ol>
Hope that helps. Anyway, here's the code... ;D
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Division based xhtml and CSS Template</title>
<!-- To create an external stylesheet copy and paste all the css contained in the <style> tags.
Create another file called 'style.css', and upload to your website folder. You do not need
to use style tags in the external stylesheet. -->
<link rel="stylesheet" type="text/css" href="style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta name="description" content="add a Website description here" />
<meta name="copyright" content="add your copyright info here © 2007" />
<meta name="robots" content="all" />
<style type="text/css">
<!--
/* COLOURS: (color: changes the text colour) */
#wrap {background-color:#f5efef;}
body {color:#421c1c; background-color:#e4d6d6;}
h1, h2, h3, h4, h5, h6 {color:#892d2d;}
/* Border Colours */
table, td {border:1px solid #892d2d;}
#content1 {border-bottom: 1px solid #892d2d;}
#content5 {border-top: 1px solid #892d2d;}
#wrap, #content3 {border-left: 1px solid #892d2d;border-right: 1px solid #892d2d;}
.hr {border-top:1px solid #892d2d;}
/* Navigation bar links */
#content1 a:link, #content1 a:visited {text-decoration:none; color:#892d2d;}
#content1 a:hover {color:#421c1c;}
/* main links */
a:link {color:#892d2d;} a:visited {color:#2d3a89;} a:hover {color:#892d2d;}
a:hover, a:active, a:focus {text-decoration:none;}
a:active, a:focus {background-color:#892d2d; color:#f5efef;}
/* type selectors */
body {margin:0 auto; width:800px; font-family:arial, verdana, helvetica, sans-serif; font-size:0.8em;}
div div div {text-align:center;}
h1 {font-size:1.1em;}
h2, h3, h4, h5, h6 {font-size: 1em;}
h1, h2, h3, h4, h5, h6, p {margin:0 0.8em; padding:0.3em 0;}
hr {display:none;}
img {border-style:none; margin:0.7em 0 0;}
li {List-style-type: none;}
ol, ul {padding:0; margin:0.5em 0.8em;}
table {margin:1em 0.8em;}
/* id selectors */
#content2, #content3, #content4 {float:left; padding: 1em 0;}
#content2, #content4 {width:148px;}
#content1, #content5 {clear:both; padding:0.8em 0;}
#content1 li {display:inline; padding:0 0.5em 0 0;}
#content3 {width:500px;}
#content5 {height: 20px;}
/* class selectors */
.imgfl, .imgfr {padding: 0 1em;}
.imgfl {float:left;}
.imgfr {float:right;}
.hr {margin:0.7em 0.8em 0.5em;}
-->
</style>
</head>
<body>
<div id="wrap">
<!-- Content One -->
<div id="content1">
<h1>My groovy website (Content One)</h1>
<ol>
<li><a href="home.html">Home</a></li>
<li><a href="">About</a></li>
<li><a href="">Content</a></li>
<li><a href="">Email</a></li>
</ol>
<hr />
</div>
<!-- Content Two -->
<div id="content2">
<h1>Content 2</h1>
<ol>
<li><a href="">Link one</a></li>
<li><a href="">Link two</a></li>
<li><a href="">Link three</a></li>
<li><a href="">Link four</a></li>
<li><a href="">Link five</a></li>
<li><a href="">Link six</a></li>
<li><a href="">Link seven</a></li>
<li><a href="">Link eight</a></li>
</ol>
<div class="hr"><hr /></div>
<table>
<tr><th colspan="2">Table Heading</th></tr>
<tr><td>left </td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
</table>
<div class="hr"><hr /></div>
<h2>Unordered List</h2>
<ul>
<li>Star Trek</li>
<li>Lost</li>
<li>Lord of the Rings</li>
<li>Star Wars</li>
<li>Doctor Who</li>
</ul>
<div class="hr"><hr /></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed porta eros id magna ultrices dignissim. Maecenas turpis. Proin condimentum. Vivamus auctor porttitor neque.</p>
<div class="hr"><hr /></div>
<div><img src="http://img.photobucket.com/albums/v283/dudleythoth/testimg.jpg" alt="my image" /><p>caption</p></div>
<hr />
</div>
<!-- Content Three -->
<div id="content3">
<h1>Content 3</h1>
<div class="imgfl"><img src="http://img.photobucket.com/albums/v283/dudleythoth/testimg.jpg" alt="my image" /><p>float left</p></div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed porta eros id magna ultrices dignissim. Maecenas turpis. Proin condimentum. Vivamus auctor porttitor neque. In hac habitasse platea dictumst. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean cursus <a href="http:/nothinhere.com">purus sed lacus. In sodales mauris. Pellentesque habitant morbi tristique senectus et netus et</a> malesuada fames ac turpis egestas. Aliquam ut justo ut ligula pulvinar facilisis. Nam eget diam eu quam tincidunt imperdiet. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis sollicitudin. Suspendisse potenti. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc hendrerit gravida dolor. Sed bibendum tincidunt velit. Maecenas lorem. Sed dui. Ut vel ante.</p>
<blockquote><p>Aenean pulvinar dui sed mauris. Vestibulum nibh ipsum, convallis sed, accumsan ac, accumsan vitae, ipsum. Ut ut urna ullamcorper ligula accumsan tempor. Proin diam. Donec sit amet mi.</p></blockquote>
<div class="imgfr"><img src="http://img.photobucket.com/albums/v283/dudleythoth/testimg.jpg" alt="my image" /><p>float right</p></div>
<p>Aenean pulvinar dui sed mauris. Vestibulum nibh ipsum, convallis sed, accumsan ac, accumsan vitae, ipsum. Ut ut urna ullamcorper ligula accumsan tempor. Proin diam. Donec sit amet mi. Curabitur et eros vitae quam rutrum placerat. Duis porttitor sapien ac metus. Pellentesque varius blandit lorem. Maecenas magna lacus, accumsan et, tincidunt ac, rutrum sed, velit. Nunc vel ipsum sed pede nonummy facilisis. Aenean consequat leo non magna. Cras lacus magna, sagittis eget, pulvinar at, consectetuer sed, metus. Suspendisse porttitor gravida pede. Ut in enim. </p>
<div class="hr"><hr /></div>
<table>
<tr><th colspan="2">Table Heading</th></tr>
<tr><td>left </td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
<tr><td>left</td><td>right</td></tr>
</table>
<p>Etiam varius volutpat urna. Donec consequat felis. In hac habitasse platea dictumst. Sed arcu massa, pharetra dignissim, congue eu, nonummy ut, mi.</p>
<div class="hr"><hr /></div>
<h2>Unordered List</h2>
<ul>
<li>Star Trek</li>
<li>Lost</li>
<li>Lord of the Rings</li>
<li>Star Wars</li>
<li>Doctor Who</li>
</ul>
<div class="hr"><hr /></div>
<h2>more paragraphs</h2>
<p>Nam varius rhoncus justo. Curabitur ipsum sem, adipiscing eu, dignissim sed, suscipit eu, nulla. Nam pharetra ullamcorper arcu. Suspendisse sit amet tortor in neque blandit suscipit. Praesent ut est. Etiam varius volutpat urna. Donec consequat felis. In hac habitasse platea dictumst. Sed arcu massa, pharetra dignissim, congue eu, nonummy ut, mi. Morbi eget orci eu odio volutpat elementum. In vestibulum mattis justo. Suspendisse semper neque id elit. Suspendisse venenatis. Proin justo. Integer feugiat suscipit elit.</p>
<div class="hr"><hr /></div>
<p>Pellentesque hendrerit dolor et orci. Curabitur porta massa vitae felis. Duis dolor dolor, placerat eget, feugiat eget, nonummy ut, nisl. Fusce diam nulla, euismod eu, aliquam ut, vestibulum vitae, tellus. Mauris lobortis fermentum est. Pellentesque nec enim. Morbi semper venenatis ante. Vivamus vehicula eleifend lacus. Sed nunc. In nisi nisi, mattis in, tristique non, fringilla volutpat, justo.</p>
<hr />
</div>
<!-- Content Four -->
<div id="content4">
<h1>Content 4</h1>
<p>Etiam varius volutpat urna. Donec consequat felis. In hac habitasse platea dictumst. Sed arcu massa, pharetra dignissim, congue eu, nonummy ut, mi.</p>
<div class="hr"><hr /></div>
<div><img src="http://img.photobucket.com/albums/v283/dudleythoth/testimg.jpg" alt="my image" /><p>caption</p></div>
<div class="hr"><hr /></div>
<ol>
<li><a href="">Link one</a></li>
<li><a href="">Link two</a></li>
<li><a href="">Link three</a></li>
<li><a href="">Link four</a></li>
<li><a href="">Link five</a></li>
<li><a href="">Link six</a></li>
<li><a href="">Link seven</a></li>
<li><a href="">Link eight</a></li>
</ol>
<div class="hr"><hr /></div>
<p>Sed consequat viverra odio. Proin eget sapien quis odio imperdiet interdum. Nullam malesuada, mi non tempor tincidunt, erat felis semper libero, vehicula fringilla nunc eros id diam. Vivamus vel lorem. Integer rhoncus augue mollis nulla. In at nunc at lectus rutrum tincidunt. Ut sagittis. Etiam tristique, odio at tempus venenatis, quam odio pretium dolor, commodo mollis nisi augue vel ligula.</p>
<hr />
</div>
<!-- Content Five-->
<div id="content5"><p>mahud © 2007 (Content 5) <a href="http://validator.w3.org/check?uri=referer">XHTML 1.0 Strict</a></p></div>
</div>
</body>
</html>
If you are having any further difficulties, or want to modify the template, let me know