Category Archives: Web Tutorials

Start Learning CSS Part 2

The basic page template

Go to the Tutorfordesign home page and grab the practice HTML page that we will use as the starting template for this tutorial. You can find it under the heading: ‘To create the practice HTML page do the following:’ Follow the instructions there and create your basic HTML page.
Once you have created the template page, create a folder and name it something like: ‘myCSSwebsite’ and then drop the HTML page into it. In that same folder, create a new text document and call it: ‘myCSS.css’. Once created open that file and paste in this template CSS code and then save it:

/* Generic Selectors */
 
body {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 14px;
color: #333333;
background-color: #F9F9F9;
}
 
p {
width: 80%;
}
 
li {
list-style-type: none;
line-height: 150%;
list-style-image: url(../images/arrowSmall.gif);
}
 
h1 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 18px;
font-weight: bold;
color: #000000;
}
 
h2 {
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 16px;
font-weight: bold;
color: #000000;
border-bottom: 1px solid #C6EC8C;
}
 
/**************** Pseudo classes ****************/
 
a:link {
color: #00CC00;
text-decoration: underline;
font-weight: bold;
}
 
li :link {
color: #00CC00;
text-decoration: none;
font-weight: bold;
}
 
a:visited {
color: #00CC00;
text-decoration: underline;
font-weight: bold;
}
 
li a:visited {
color: #00CC00;
text-decoration: none;
font-weight: bold;
}
 
a:hover {
color: rgb(0, 96, 255);
padding-bottom: 5px;
font-weight: bold;
text-decoration: underline;
}
 
li a:hover {
display: block;
color: rgb(0, 96, 255);
padding-bottom: 5px;
font-weight: bold;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #C6EC8C;
}
 
a:active {
color: rgb(255, 0, 102);
font-weight: bold;
}
 
/************************* ID's *************************/
 
#navigation {
position: absolute;
width: 210px;
height: 600px;
margin: 0;
margin-top: 50px;
border-right: 1px solid #C6EC8C;
font-weight: normal;
}
 
#centerDoc {
position: absolute;
padding: 0 0 20px 0; /*top right bottom left*/
margin-top: 50px;
margin-left: 235px;
}
 

Don’t let the CSS freak you out, I will explain the important details and you will soon see how easy it really is. One last thing for you to do before I finish this part of the tutorial, we need to add some code to our HTML page.
In between the tags you will need to insert this code:

<div id="navigation">
 
<h2>The Main navigation</h2>
</div>
 
 
<div id="centerDoc">
 
<h1>The Main Heading</h1>
 
<p>Go to the Tutorfordesign home page and grab the
practice HTML page that we will used as the starting template for this
tutorial. You can find it under the heading: 'To create the practice HTML
page do the following:'.</p>
 
<p>Follow the instructions there and create your basic HTML page
... and do it now!</p></div>

And in between the tags you will need to insert this:

<title>First CSS Tutorial</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="myCSS.css" rel="stylesheet" type="text/css">

With this in place we will be able to start styling our page. If you take a look at the HTML page now you may be surprised to see that we already started!

Start Learning CSS Part 1

In this CSS tutorial I will not be able to show you everything there is about CSS, but you will learn how to create nice looking CSS styled web pages.

After completing this tutorial, you should have enough information to explore CSS and web design even further.

Things to remember about CSS: 
Remember that CSS code is simply written instructions that tells Web browsers (like FireFox and Internet Explorer) how to display things on a page. For example:

  • make text bold.
  • position things a page.
  • set the font style for a page or paragraph etc.The sister language to CSS is HTML: code that tells the Web browser WHAT is actually in the page.

… I know you knew that already, I just wanted to remind you!

CSS reduces the number of tags used

Because of the power of CSS, we will be able to reduce the number of HTML tags we use in a page big time, all the while still being able to layout great looking pages using only 6 types (for lack of better words) of HTML tags.
The tags we will use to layout the content:

  1. The Heading tags which range from

    ’ to ‘

    , are going to be used to mark/tag headings in our pages. So the most important heading will be wrapped in a

    tag and the least important in a

    tag.
    An example of a heading:

    <h1><strong>CSS  Template Layout</strong></h1>

    This tells the browsers and the search engines too, that this page is primarily about: ‘CSS Template Layout’
    All browsers have a default size (for each tag) as to how it renders text when placed between these tags. Many of these defaults can be unusable (especially

    ) because they come out too big. But never fear, CSS is here. We will use CSS to make the text sizes more to our liking.

  2. The Paragraph tag is used to mark parts of the pages as being ‘paragraphs’, simple enough. Paragraph tags are what they call a ‘block element’; that means that it acts like a block where a space is automatically inserted before and after each

    tag pair. You see it work in the examples coming up.

    • and

        List tags will be used to create our menus. The tag

          is the ‘un-ordered list tag’ that creates a list with bullets or other images/icons that do not specify or denote an order; hence the term ‘un-ordered’. The other list tag mentioned (

            ) is the ‘ordered list tag’ and it creates a list that, instead of bullets, the list elements are marked with numbers or letters. Code examples to follow.

          1. We all know what the

            tag is about since we all read the previous article, right? We will use div’s to create containers for parts of our page. One div will be used to ‘hold’ our navigational menu and another div to ‘hold’ the main page.
          2. The most important tag in HTML: the ‘link tag’ or the ‘hyperlink tag’. This makes text ‘hyper’ so that when we click on it we can load another page or activate/call some JavaScript (otherwise known as ECMA script).
          3. This is the ‘image tag’, allows you to link to images so that they show up in our pages. In HTML images are not embedded into the actual page, instead the image tag () only points to where the image is and the browser will attempt to load that image when a surfer loads your HTML page.

          That covers the HTML tags we will use in our layout! No need for table tags,
          tags and nasty tags.

          PHP

          PHP Tutorial



          HTML

          HTML Tutorial

          Note: Before you can download this tutorial you need to have utorrent, because the file is contain with Utorrent extension. Thank you .