Yo, I'm fiddling with my pants website, mrdictionary.net! I've got tons of content but I've not linked it up because I don't like updating my website.
I've decided to waste some time and see what I can do if I wire up some CSS instead of using tables.
At the moment, the whole website is in a big table:
Code:
***************************************
* * *
* logo cell * menu cell *
* * *
* * *
***************************************
* *
* *
* content cell *
* *
* *
* *
* *
* *
* *
* *
***************************************
* footer cell *
***************************************
This layout lets me put stuff in the corners of the screen nicely, and everything is great and good.
However, I've tried remaking a similar layout in CSS and I can't figure out how to get the footer to do what I want.
If I make a table that has a width and a height of 100%, then it will always try and fill the browser window. If I give the cell above the footer cell a height of 100% and the footer cell a specific pixel height and not allow it to be crushed, then the footer will stay at the bottom of the screen if the main cell isn't big enough to fill the screen, otherwise it will be pushed down.
I can't figure out how to replicate this behaviour in CSS.
With the following layout, the footer div will always be below the elements above it in the flow (as long as no absolute stuff is mucking it up).
Code:
***************************************
* *
* *
* *
* content div full of things *
* *
* *
* *
* *
* *
* *
* *
***************************************
***************************************
* footer div - clear both float right *
***************************************
If I tell the content div height: 100%, then the content div takes up the whole window and the footer sticks off the bottom causing scrollbars to appear.
Am I supposed to put both the content and footer divs inside a 'page' div with width and height 100%, and somehow tell the footer div to be at the bottom of that? I can't figure out how to tell the footer div how to do that. (As I remember, 'absolute' means to the entire browser layout, 'relative' means to the flow position it would have, 'fixed' means to the browser window always (which would be good if I wanted it 'stuck' to the browser edge at all times.)
Who here is CSS enough to master this challenge?
Also, if anybody can figure out a cool new layout for my website, based on the kind of placeholder stuff it has now (in the categories, but feel free to change or remove the categories completely), that would be grand.