• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you reference the bootstrap css and js in CI

#1
[eluser]huangxiao[/eluser]
HI, I just want to ask some help how can i reference my CSS and JS bootstrap in CI.

I do it like this.


Code:
<!Doctype html>
  &lt;html&gt;
   &lt;head&gt;
       &lt;meta name="viewport" c initial-scale=1.0"&gt;
       &lt;!-- Bootstrap --&gt;
       &lt;link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"&gt;
       &lt;link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet" media="screen"&gt;

       [removed][removed]
       [removed][removed]
   &lt;/head&gt;

&lt;body&gt;

  
       <div class="navbar navbar-fixed-top">
         <div class="navbar-inner">
              text
         </div>
       </div>


&lt;/body&gt;



&lt;/html&gt;


but it could not be found.can anyone would like to help how to use refrence the CSS and JS of bootstrap.

Thank you.

#2
[eluser]CroNiX[/eluser]
Don't use relative URLs.

Your url assumes the bootstrap directory will be in the same directory that the call was made to. If your bootstrap dir is in your web root dir, then you just need to add a / at the beginning of the url to tell it to start from the root of the site (/bootstrap/css/bootstrap.min.css), or use a complete url like http://yoursite.com/bootstrap/css/bootstrap.min.css

#3
[eluser]huangxiao[/eluser]
[quote author="CroNiX" date="1381611956"]Don't use relative URLs.

Your url assumes the bootstrap directory will be in the same directory that the call was made to. If your bootstrap dir is in your web root dir, then you just need to add a / at the beginning of the url to tell it to start from the root of the site (/bootstrap/css/bootstrap.min.css), or use a complete url like http://yoursite.com/bootstrap/css/bootstrap.min.css
[/quote]


Thank you so much you solved my problem.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.