HTML layouts. Ideal solution, idea 1.
Following on from the CSS v tables for layout debate that is raging (continuously). As detailed in my previous post I feel that a HTML page is the combination of the content and layout. I.e. layout elements (multiple unnecessary divs in the case of CSS, tables in the case of table layouts) should be separate from the content. However that does not actually help with how to get your HTML laid out.
So I am going to mind dump a few possible ways layout could be done. These are not serious suggestions, just ideas.
The first approach is by far the most unlikely. Why? Well it requires extensions to CSS which, as we know, could take a decade to reach our IE6 using friends.
So the basic problem of layouts is that we want to divide our page into distinct areas. A typical layout might look like this (image from java2s.com):
This is called a ‘Border Layout’ (in java terminology at least). For example, you might want to have the header in the ‘North’ section, a sidebar in the ‘East’ section, your footer in the ‘South’ section and your content in the ‘Center’ section. You might not use all sections (i.e. we might not put anything in the West section) at which point it is not rendered. So this is a very flexible layout, able to do two and three columns, and can probably account for 95% of all web layouts out there. There are other basic layout types, and I think that with a few pre-defined layouts you could cover the vast majority of layouts with ease.
Imagine if we had a new CSS attribute in the body element:
body{
layout-manager: border-layout;
}
Ok, so we have said to the browser, we would like to render this page using the border layout model as detailed about. How do we add content to each section?
div#navigation{
position: layout;
layout-position: east;
}
Hmmm, easy hey? Using the CSS file we can assign page elements to the different layout sections. Of course the problem with this is that it limits you to a pre-defined set of layouts. You could probably use the CSS3 layouts module to define your own.






















