Favourites Create PDF Email Print

Why am I getting double borders or spacing issues around my MetaMod?

Date added:
Friday, 11 September 2009
Last revised:
Friday, 11 September 2009
Vote for this:
Good - Bad
0 Favour


The way MetaMod works is this:

This means that there is extra HTML surrounding each module. This extra HTML would not be there if you had just placed the module onto the page in the normal way (without MetaMod).

The extra HTML tends to have side-effects with the CSS of your page. Many templates detect the “start” of a module, and place borders, background colouring or extra spacing around the module as part of the styling.

This can affect your module’s layout in various ways: you may see two sets of borders, or strange spacing or other behaviour.


  1. Get MetaMod Pro. MetaMod Pro changes the way that MetaMod places modules onto the page. Instead of being wrapped inside the MetaMod’s HTML, the included modules are placed directly onto the page, just as if the MetaMod was not there. The HTML for the modules will not get messed up. MetaMod Pro also completely removes the MetaMod from the page if it doesn’t include any modules (see here for more info).

  2. There are some steps you can take that can often help the CSS of your site with minimal effort, without MetaMod Pro:
    • Add a “CSS Class Suffix” to the MetaMod. e.g. “-metamod” (although it’s arbitrary). This is often enough to fool the CSS into not recognising the MetaMod as a module – therefore the outer MetaMod doesn’t get styled, but the inner included modules still do.
    • Try different combinations of “Style for Included Modules” in the MetaMod. One of them may give you the results you’re looking for.
    • Have a look at the index.php file in the template you are using, for lines like: <jdoc:include type="modules" name="left" style="rounded" />.

      The clue is in the “style” – if it’s "rounded" then use “Multiple Divs”; if “xhtml” use “XHTML”, if “table” use “In a table”, if “none” or “raw” use “Naked”. If it’s anything else, then enter that word into the parameter named “Style Override for Included Modules”.


MetaMod 2.x , MetaMod 1.0

Tags for this item

Joomla 1.0 , Joomla 1.5