yeah i learned from w3schools mainly as well.
You should mainly use position absolute when you want to take advantage of the z-index. Other than that I wouldn't use it in normal case. I use float and clear as stated before and I simply use the default css of div which is quite nice as well.
instead of top and left, you would use margin
Most websites are centered in the middle, like lebgeeks for example. The content of the website is in center of the page. You can achieve this trick by putting a main div and centering it. However to center a div you need to give it a width, most website content is around 980px to 1000px since most monitors have a width 1024px ( that was an old survey... )
So you have a main div that is centered acting as a holder to the whole contents. Now that you have that centered you can simply float things :)
so if i want to build something like this website the code will look like
HTML
<div id="mainWrapper">
<div class="logoWrapper">
<div class="logoImage">
<img src="..." alt="logo" />
</div>
<div class="logoText">
A community for technology geeks in Lebanon
</div>
</div>
<div class="menuWrapper">
<ul> <!-- menus should be inside ul and li to be parsed properly by search engines, in HTML5 u should use nav instead of div class="menuWrapper" ... -->
<li>Index</li>
<li>Rules</li>
</ul>
</div>
</div>
CSS
#mainWrapper
{
margin:0 auto;
width:980px;
}
.logoWrapper
{
float: left;
clear: left;
}
.logoImage
{
float: left;
margin:0 10px 0 0;
}
.logoText
{
float:left;
}
.menuWrapper
{
float: left; /* float left + clear left act like <br> it goes down a line, you can use margin to go lower or higher */
clear: left;
}