Home | Blog | Twitter @AndyJ | Contact Me | Snippets/Downloads | RSS

CSS Layout techniques

Anyone who has read my blog for a while will know that I like changing it around. I've tried alot of different CSS techniques over the past few years but when it comes to tried and tested layouts check out Glish.

Layouts covered inclue:

http://www.glish.com/css/

Related Blog Entries

TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Tony Petruzzi's Gravatar To be honest, I've seen these layout templates before and I really can't stand them. Any layout that uses the voice family hack is off my list.

The biggest problem that all of these layout have is that they try to work around the box model difference between IE and FF. The truth is that if you always remember to start off your layout CSS with *{margin:0px;padding:0px;border:0px;} and remember to only float divs, you should never have a problem.

Another little remind is that IE and FF different when having floating div being contained within their parent div. For instance
<div id="container" style="border:1px solid red;">
<div style="float:left;width:100px;height:100px;border:1px solid blue;"></div>
<div style="float:left;width:100px;height:100px;border:1px solid green;"></div>
</div>

The trick here is to have a clear:both just before the container's closing </div> like so:
<div id="container" style="border:1px solid red;">
<div style="float:left;width:100px;height:100px;border:1px solid blue;"></div>
<div style="float:left;width:100px;height:100px;border:1px solid green;"></div>
<div style="clear:both"></div>
</div>

Just by following these two rules you will not have to resort to hacks 99.999% of the time and your layout will display properly across all browsers
# Posted By Tony Petruzzi | 1/18/07 1:58 AM
Michael Dinowitz's Gravatar While I use a lot of CSS, there are places where I just don't bother. When dealing with a 3/4 column design, a simple, tight table allows much more control than CSS, especially when it comes to equal length columns. CSS past the columns, yes. But for the columns, no.
This is even more important when doing absolute positioning for SEO purposes.
# Posted By Michael Dinowitz | 1/18/07 2:38 PM
RJD's Gravatar I'm trying to add a footer to the 4 columns, all fluid layout. Everything I do results in the footer "underlayed" by the columns. Do you have any suggestions on how to add a footer to this example that will move down as the columns grow? Thanks.
# Posted By RJD | 7/17/08 7:35 PM
BlogCFC / created by Raymond Camden / running version 5.9.5.003 / Contact AndyJarrett.com / Pet Rescue SOS www.redgiraffes.co.uk