Variable Layout

Variable Layout

Urs Hunkler -
回帖数:5
Core developers的头像

Hi,

some questions which have been asked about CSS possibilities kept me thinking (Martin asked for a 2 Column layout, Tony asked for a small-screen PDA version ...).

From the artikel JavaScript Triggers from Peter-Paul Koch at ALA I want to cite the starting paragraph.

The front end of a website consists of three layers. XHTML forms the structural layer, which contains structural, semantic markup and the content of the site. To this layer you can add a presentation layer (CSS) and a behavior layer (JavaScript) to make your website more beautiful and user-friendly. These three layers should remain strictly separate. For instance, it should be possible to rewrite the entire presentation layer without touching either the structural or the behavior layer.

Having this principles in mind I have build a model with a XHTML layer, several CSS layers and a small behaviour layer which gives some answers to those questions: Variable Layout. With the "Styleswitcher" on top of the page you can change the layout part of the CSS and you will see how the whole page changes. I see many chances ...

Have fun and please tell me, what you think

回复Urs Hunkler

Re: Variable Layout

N Hansen -
Personally, I don't like using CSS for layout. I've seen too many websites where it just doesn't work, with things overlapping one another. 
回复N Hansen

Re: Variable Layout

Urs Hunkler -
Core developers的头像
Those websites you find everywhere. The point is, that CSS does not neccessarily mean a layout without tables.

IMO the critical elements are the blocks holding content. These blocks (the colored fields in the example) can easily be surrounded by tables. I tested the model with a layout with tables and without tables. It works the same. Important is to use the tables where needed, but avoid them where they restrict.

If tables are better for holding the content of the blocks "together", use them. For rearanging the page layout you cannot attach tables for the basic layout framwork because the changes wont work any more. But concerned to block positioning I don't expect those overlapping problems.
回复Urs Hunkler

Re: Variable Layout

David Kelly -
Very nice demo Urs...
it would give easy and versatile control of large (moodle-wide) or small (a module) chunks of layout/interface as needed ... Indeed tables could be used.

for accessibility it makes me think of many possibilities too ...specialised layouts for people with visual/motor difficulties for example

bit by bit
Dave