Hi I have a Joomla site with a template that has 2 columns. One for the main content and the other for modules. On different pages either the content column is shorter than the module column or vice versa. How can I ensure that the 2 columns are always of the same height so that they both meet up equally at the footer on any page?
views:
25answers:
2
+1
A:
You'll need some CSS hacks or Javascript. Personally I favour the Javascript method, google equal height collumns.
thomasfedb
2010-07-14 16:23:54
+1
A:
Using Javascript:
window.addEvent('load', function(){
// Load assuming there could be images.
// Otherwise use domready
var columns = $$('css selector for the columns');
if(columns && columns.length > 1){
var heights = [];
columns.each(function(el){
heights.push(this.getStyle('height'));
}).setStyle('height', Math.max.apply( Math, heights ));
delete(heights);
}
});
You can use CSS to make sure your footer stays at the bottom of the page. Love Mootools.
Chase
2010-07-14 22:52:33