I'm trying to finish the "Head first" html/xhtml book. As long as you just follow the book, it's OK, but now that I try to combine things myself, everything breaks apart.
I tried to combine the "jello" design with fixed positioning.
Code:
#allcontent {
width: 800px;
padding-top: 5px;
padding-bottom: 5px;
background-color: rgb(180,180,180);
margin-left: auto;
margin-right: auto;
}
This works when I float the main column and the sidebar.
When I try to absolutely position them, the #allcontent div breaks apart.
e.g.
Code:
#main {
position: absolute;
top: 128px;
left: 0px;
width: 420px;
}
This leads the main column to land all the way to the left of the browser window.
The sidebar lands all the way to the right.
Of the browser window, not of the page borders.
When I absolutely position an element inside an absolutely positioned element, the whole page flies apart like constructed by a suicide-web designer.
The 800px width is completely ignored by all elements except by the header. I don't know why the header respects it.
I very much regret having bought for my first design book "Head First: HTML with XHTML and CSS" (a big curse on those Amazon.com reader's reviews). (I'd be able to name many more body parts that would make a better name for this book than "head", but none of them is pretty). This book explains the obvious, and passes out when it comes to the important things, like the cascade, which is just mentioned and "dealt with" on 2 pages.
I really miss solid information here.
So, any hint what is going on here would be considered helpful.
PS: If you are wondering why I don't ditch the "Intestinal Conent First: HTML with XHTML and CSS" book (I already bought Michael Bowers' "Pro CSS and HTML Design Patterns"): if something doesn't work I want to solve it rather than ditch it, and I want to find out where the incomplete information is that I have gotten.