Moodle

Replace table layout with div

Details

Description

Currently Moodle uses tables to generate the page layout. While they do appear to work, tables are not intended for page layout, and divs offer more flexibility and customization with the evolving web standards.

The proposed solution is to replace the layout table with floating divs.
A container div is required, with margins on both sides set to the block width (these margins can be optional based on whether there are blocks on the page or not). The left column would be stored as a floating div, followed by the right column, followed by the actual content for the centre.

This system has already been tested with 1.9 on our production site: http://www.thomashaney.ca/

The main issues are that it would require a rewrite of many themes. With that in mind, it would be best to mark it for 2.0 rather than 1.9.x so as to not break existing themes.

I can provide a patch for the standard theme .css files and the index.php as an example.

Issue Links

Activity

Hide
Eloy Lafuente (stronk7) added a comment -

Hi Darryl,

thanks a lot for sharing your experiences here. I think there is one ongoing task about replacing table layouts, in fact, since some weeks ago, the main course pages are 100% free from "layout-tables".

As you know there are a lot of parts involved (themes, core functions...) and I think it's very important to have all the info properly compiled before deciding anything.

I'm reassigning this to Martin, to let him know about your progresses while he decides about the best way to address this problem for 2.0.

Thanks and ciao

Show
Eloy Lafuente (stronk7) added a comment - Hi Darryl, thanks a lot for sharing your experiences here. I think there is one ongoing task about replacing table layouts, in fact, since some weeks ago, the main course pages are 100% free from "layout-tables". As you know there are a lot of parts involved (themes, core functions...) and I think it's very important to have all the info properly compiled before deciding anything. I'm reassigning this to Martin, to let him know about your progresses while he decides about the best way to address this problem for 2.0. Thanks and ciao
Hide
Tim Hunt added a comment -

Just to note, the other bug Eloy refers to is MDL-9306. Should we close this bug as a Duplicate, and focus all work on the other bug?

Show
Tim Hunt added a comment - Just to note, the other bug Eloy refers to is MDL-9306. Should we close this bug as a Duplicate, and focus all work on the other bug?
Hide
Eloy Lafuente (stronk7) added a comment -

+1 here

Show
Eloy Lafuente (stronk7) added a comment - +1 here
Hide
Eloy Lafuente (stronk7) added a comment -

NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

Show
Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

People

Vote (5)
Watch (4)

Dates

  • Created:
    Updated: