Monday, May 25, 2009

Joomla! 1.5 Fixing the Tabs for IE

The basic tabs style does not really display properly in Internet Explorer. See my tutorial on how to create tabs through the Joomla! framework.

In Internet Explorer the dd and dt tags does not stack properly while it display properly in Firefox, Chrome, Opera and Safari.

To fix this issue, an IE only style is created and included in the site template's  index.php file, or the existing ieonly.css file in the template/css directory can be used, if there is such a file.
E.g.
<!--[if IE]>
<link href="<?=$this->baseurl?>/templates/<?=$this->template?>/css/ieonly.css" rel="stylesheet" type="text/css" />
<![endif]-->

In this css file the following code is added.
div.current { overflow:auto; }
div.current dd  { float:left; }

And the display issue is fixed!

Credits: I would like to credit alexwai for figuring out a solution for this. See thie forum thread.