roy92
CSS HAXOR
Since starting on learning CSS, I have found it to be extremely (as in extremely) easy to make websites (in fact, it's easier to use this method than using tables) you don't even need a WYSIWYG editor, just Firefox:P and notepad. So let's start.
So I assume you have basic knowledge of css if you don't, maybe when I get some free time and a clear head:doh: I'll do a quick tutorial on that.
here's our basic layout on css
and the "DIV's" in HTML
that's just the basic layout, your browser shouldn't show you anything right now, if it does, please double check. Also, that's all you have to put on your HTML document as far as coding is concerned, that is if you want to add a title or javascript or other stylesheets.
now to make it a 2 column layout
so your page is all set up now, but you won't see anything in your browser yet until you add the content to your site and make the site prettier.
and that's it, you can now style up (as in specify the background of the body (whole page) and the header, menu, nav and footer. If you wanna get nifty, then reduce the 150px from the menu and make another column
this will now be a 3 column page!
hope this will be a help to someone learning CSS (I kinda rushed it though, sorry, but I'll refine this tutorial with pictures and other examples next time) and once you get the hang of it, I'm sure you will find it very powerful. Stay tuned for more tutorials...
So I assume you have basic knowledge of css if you don't, maybe when I get some free time and a clear head:doh: I'll do a quick tutorial on that.
here's our basic layout on css
Code:
body {
}
#container{
}
#header{
}
#content{
}
#menu{
}
#footer{
}
and the "DIV's" in HTML
Code:
<html>
<head>
<link rel="stylesheet" a href="layout.css" type="text/css" />
</head>
<body>
<div align="center">
<div id="container">
<div id="header"></div>
<div id="content"></div>
<div id="menu"></div>
<div id="footer"></div>
</div>
</div>
</body>
</html>
that's just the basic layout, your browser shouldn't show you anything right now, if it does, please double check. Also, that's all you have to put on your HTML document as far as coding is concerned, that is if you want to add a title or javascript or other stylesheets.
now to make it a 2 column layout
Code:
body {
}
#container{
width: 800px;
}
#header{/*this is where you put your banner or header*/
width: 100% /*this is relative to the container's width so this will equal 800px*/
}
#content{/*this is where your main content goes*/
width: 500px;
float: left; /*the content part of the layout will float to the left side of the page*/
}
#menu{/*this is where your menu goes*/
width: 300px;
float: right; /*the menu or navigation will float to the right side of the page*/
}
#footer{/*this is where your footer goes*/
width: 100%;
float: left; /*the footer by now shouldn't need this as the content and menu leave it no where to go but under it, but it's a bug in the browser's (i think)*/
}
so your page is all set up now, but you won't see anything in your browser yet until you add the content to your site and make the site prettier.
and that's it, you can now style up (as in specify the background of the body (whole page) and the header, menu, nav and footer. If you wanna get nifty, then reduce the 150px from the menu and make another column
Code:
#othercolumn {
width: 150px;
float: left;
}
this will now be a 3 column page!
hope this will be a help to someone learning CSS (I kinda rushed it though, sorry, but I'll refine this tutorial with pictures and other examples next time) and once you get the hang of it, I'm sure you will find it very powerful. Stay tuned for more tutorials...