Welcome Guest, Not a member yet? Register   Sign In
Using a link to CSS in the header template and applying it to the content page.
#1

[eluser]Unknown[/eluser]
I have a view template called main.php, which loads the header, footer, and the content (page view). There is a link to my css file in the header, and when the page renders the css is applied to the header and footer, but not the content. How can I correct this? Below is the code for the main.php template

Code:
<?php $this->load->view('templates/header'); ?>
<div id="content">
    
    &lt;?php
    
    $this->load->view($content);
    ?&gt;
    
</div>    
    &lt;?php $this->load->view('templates/footer'); ?&gt;

Any help woudl be greatly appreciated.

Sincerly,

Brent
#2

[eluser]johnpeace[/eluser]
phil sturgeon's templating class makes this SO much easier.

http://philsturgeon.co.uk/blog/2009/12/C...te-library
#3

[eluser]Aken[/eluser]
I'm guessing your CSS is incorrect, or your HTML is broken. There's no reason parts of your page would be excluded from having CSS applied to it.




Theme © iAndrew 2016 - Forum software by © MyBB