CodeIgniter Forums
View Problem - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: View Problem (/showthread.php?tid=20188)



View Problem - El Forum - 07-01-2009

[eluser]gedev2006[/eluser]
Hi

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:

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
&lt;head&gt;
&lt;link rel="stylesheet" type="text/css" href="&lt;?= base_url(); ?&gt;css/main.css" /&gt;
&lt;/head&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

[eluser]TheFuzzy0ne[/eluser]
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. http://validator.w3.org


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).