php - Including External stylesheet in CodeIgniter -


This is Hardic vyas, new to CodeIgniter, I know basic about CodeIgniter, I want to include the template in CodeIgniter:

But first of all, I need to include an external stylesheet in one page, but I can not, I have to face a 403 error.

Here is my code:

Administrators header.php

   ('Title') view; }}? & Gt;  

View header.php

  & lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Demo & lt; / Title & gt; & Lt; Link rel = "stylesheet" type = "text / css" href = "/ application / views / mystyle.css" /> & Lt; / Head & gt; & Lt; Body style = "background-color: antiquewhite" & gt; & Lt; H3 style = "background color: # 990000; color: #ffffff" & gt; Hello & lt; / H3 & gt; & Lt; / Body & gt; & Lt; / Html & gt;  

CSS mystyle.css

  .red {background-color: red; }  

Please provide any easy way to do this and also tell me how to include the template in the codeigner.

Your stylesheet (code) should not be inside the CodeIgniter view folder.

You should see the folders:

  /index.php /css/mystyle.css / codeigniter / application / controllers / codeigniter / application / model / codeigniter / application / View //  

Then your view should be:

  & lt; Link rel = "stylesheet" type = "text / css" href = "/ css / mystyle.css" /> If you want CSS in your Thinking folder, then I suggest:  

Folder

  / codeigniter / application / views / css / Mystyle.css  

Code

  & lt; Link rel = "stylesheet" type = "text / css" href = "/ codeigniter / application / views / css / mystyle.css" />  

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -