Skip to content

How to add an if statement for IE custom CSS in Joomla template index.php

Sometimes the your website looks different in IE and in Firefox. To avoid the problem put this piece of code in your Joomla template index.php file to overwrite the CSS for the div (in this example search-button):

<!–[if lte IE 6]>

<style type=”text/css”>

#search-button{

padding-top:6px;

}

</style>

<![endif]–>

<!–[if gte IE 7.0]>

<style type=”text/css”>

#search-button{

padding-top:6px;

}

</style>

<![endif]–>

Published inCoding