CodeIgniter Forums
View Problem - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: View Problem (/showthread.php?tid=20188)

View Problem - El Forum - 07-01-2009


I have a view file that has the following line at the top:

<?= $this->load->view ( 'templates/header' ); ?>

In the templates/header.php file it has something along these lines:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
&lt;html &gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url(); ?&gt;css/main.css" /&gt;

It includes the header file perfectly fine, but in IE its not picking up the stylesheet properly. Looks fine in FF

View Problem - El Forum - 07-01-2009

Looks fine to me, although you should really set the page encoding. I'd suggest you try clearing IEs cache/temporary internet files. Please note, however, that if the rest of your page is not valid HTML, it can also cause problems. You can validate your HTML for problems using the W3C's HTML validator.

View Problem - El Forum - 07-01-2009

[eluser]Michael Wales[/eluser]
View Source and make sure the URL generated by the base_url() helper is valid and that your link's href attribute is pointing in the right direction. You may also want to consider adding a timestamp parameter to the end, to force browsers to always reload the file (at least, until you are done developing).