
Today we are going to cut down the simple basics of some of the web designs which are available to download in the download section. The design is going to be the “Simple Media” template. You can view the completed version here, as well as download it here.
Please note, this tutorial explains more about the elements used and how- rather then a step to step guide on what to type first. Keep this in mind if your going to use this guide.
First some back history about this design, while it hasn’t been used for and project I’ve done- it has been considered originally it was going to be a new blog which I was considering openning up- anyway the rest is history.
The layouts goal is to provide easy and simple access as if it was a media based site.
First thing is first, lets look at the various CSS elements within the document.
body{ background-color:#D9D9D9; margin:0; }
This is the “body” section, and as you can see not much is really implemented in this section. We have defined the background color, which is a light gray- as well as giving the body a margin of 0. Some other things you could add to this body tag in the CSS are things such as global font settings- for example if a DIV tag doesn’t have a defined font family or size, or even color it would use what the body tag specifies.
Moving on…
div#block{ width:810px; background-color:#ffffff; padding:5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; border: 1px solid #ffffff; }
This layout uses a global “block” DIV tag which all the other DIV tag elements rest in. This “block” defines the size of the document etc.
What this block has given the user is a white block which has corned edges (if it is in a browser which supports this CSS 3.0 standard).
This block is essencially the main area of the design, everything in this design is within this block- when you put in code in the html section (such as your div tags), nothing will extend from outside this first DIV. For example.
<div id=”block”>
Extra DIV tags here.
</div>
No extra DIV tags or content here. (though you might want to put in a <p> tag or something here- or give the body a bottom margin of 50px or something to pad the design).
As you can see above, this is how the design is made with in the HTML section.
I think that was a little side quest there!
div#top{ height:50px; }
The main thing here is that the design has an extra padding for the top section because of this code. If your text goes outside of this height you might want to extend the pixels allicated to this section.
div#header{ float:left; font-family:Arial, Helvetica, sans-serif; font-size:20px; color:#03F; } div#sub{ font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#B3B3B3; text-align:left; font-style:italic; }
Both of these elements are essencialy one. This template uses this for the Sites Title and the Sites Sub Text on the main “header” section.
For the most part this bit of code defines the DIV elements, font family, font size and color. It also tells the DIV to float left.
This header, and sub DIV are placed within the top DIV tag. Like so.
<div id=”top”>
<div id=”header”>Site Title</div>
<div id=”sub”>Sub Title</div>
We are now going to put the Navigation “here”.
</div>
Moving on…
We are going to insert the navigation- as you can see above, it will still be within the top DIV tag.
div#navigation{ float:right; font-variant:small-caps; font-family:Arial, Helvetica, sans-serif; font-size:20px; color:#03F; } div#navigation a:link { color: #5C7CFF; text-decoration:none;} div#navigation a:visited { color: #5C7CFF; text-decoration:none;} div#navigation a:hover { color: #5C7CFF; text-decoration:none;}
This mostly again defines the font family, size etc. but this time it is floating right. If you have placed this correctly it will be aligned right in the “top” DIV tag.
It is also- for style design, set that the text is “Small Caps”. This means the font is in all caps- but the non Capitals are sub sized.
You can also if you want include a sub navigation, here is the code used in the template. Note the color is now changed from Blue to Green, and the size has been restricted- it still has the “Small Caps” turned on.
div#subnavi{ text-align:right; font-variant:small-caps; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#03F; } div#subnavi a:link { color: #33CC33; text-decoration:none;} div#subnavi a:visited { color: #33CC33; text-decoration:none;} div#subnavi a:hover { color: #33CC33; text-decoration:none;}
To separate the style, I’ve added a <hr> tag after the top DIV is turned off in the body of your code- (not the CSS, but the HTML).
While this element doesn’t have any CSS- it does contain some Javascript. This is used as the banner, and the Javascript is a simple array.
<div id=”banner”> <script language=”JavaScript”> function random_imglink(){ var myimages=new Array() myimages[1]=”images/1.png” myimages[2]=”images/2.png” myimages[3]=”images/3.png” var ry=Math.floor(Math.random()*myimages.length) if (ry==0) ry=1 document.write(‘<img src=”‘+myimages[ry]+’” border=0>’) } random_imglink() </script> </div>
The image array is called “myimages”, if you want you can change it to “mybanner” or “sitesname_banner” or something like that, but remember to change them all. You can also have more then 3 random banners, or less. Your choice. (The zip file for this theme contains a Black, Gray and Slightly off White image).
Moving back to the CSS. We are now defining the content area.
div#content{ font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#000000; text-align:left; } div#content a:link { color: #000000; text-decoration:underline;} div#content a:visited { color: #000000; text-decoration:underline;} div#content a:hover { color: #000000; text-decoration:none;}
Note the content area is accuarlly full width- meaning its 100% across your “block” DIV tag. The way this themes right navigation is done- is just a float. And isn’t static etc.
The content area just defines the font style. As well as aligning the text left.
div#pannel{ float:right; -moz-border-radius: 5px; -webkit-border-radius: 5px; background-color:#F2F2F2; border:1px solid #D9D9D9; padding:5px; width:300px; text-align:left; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#737373; } div#pannel a:link { color: #737373; text-decoration:none;} div#pannel a:visited { color: #737373; text-decoration:none;} div#pannel a:hover { color: #737373; text-decoration:none;}
The right “navigation” for this theme is called a Pannel, it separates the elements and floats right in the design- giving it a nice gray box as well. There are other ways to do navigation- and look out for them in future tutorials.
To finish off the CSS- we have the footer.
div#footer{ font-family:Arial, Helvetica, sans-serif; font-size:12px; color:#737373; text-align:left; } div#footer a:link { color: #737373; text-decoration:none;} div#footer a:visited { color: #737373; text-decoration:none;} div#footer a:hover { color: #737373; text-decoration:underline;}
The footer is fairly simple- and I think you know the dril now on what is defined in that section for this particular theme.
Note: The theme contains some extra CSS which identifies various things such as “title” and other DIV tags- you can use these if you want if you are creating say a blog.
Also note the panel is placed inside the content tag- similar to how you did the “top” DIV tag section. The footer is then separate to either element.
Thats it, if you have trouble please email me, and if you do use this as a basis for your layout- please drop me an email anyway- I would like to see who uses it and what for!
Remember you can download the theme in the download center.

