• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bootstrap 3 work in the latest version of Code Igniter

#1
Hi,

Can you please help me with an issue.

For you it might be very simple.

I'm trying to make Bootstrap 3 work in the latest version of Code Igniter but its not working.

Can you please send me the steps to do this please.
Reply

#2
(09-14-2015, 02:20 PM)djkaushiksk1 Wrote: Hi,

Can you please help me with an issue.

For you it might be very simple.

I'm trying to make Bootstrap 3 work in the latest version of Code Igniter but its not working.

Can you please send me the steps to do this please.

What I would do autoload url helper and form helper

Make a folder in main directory called "assets"

In assets folder create folder called plugins

assets > plugins
assets > plugins > bootstrap-3.3.5 > dist
assets > plugins > bootstrap-3.3.5 > dist > css
assets > plugins > bootstrap-3.3.5 > dist > js

on head area of header

header_view.php

Code:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
<title><?php echo $title;?></title>
<base href="<?php echo base_url();?>"></base>
<link rel="stylesheet" type="text/css" href="assets/plugins/bootstrap-3.3.5/dist/css/bootstrap.css" />
   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">

<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
   <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
   <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
   <![endif]-->
   <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
</head>
<body>

footer_view.php

Code:
<script type="text/javascript" src="assets/plugins/bootstrap-3.3.5/dist/js/bootstrap.js"></script>
</body>
</html>
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply

#3
And setup Firebug, press F12 , pen console and see if your server can download js and css files.
Reply

#4
Bootstrap 3.3.5 works fine in CI 3.0.1 I use it all of the time.

These to are both doing the same thing allowing IE browser to work with the attributes, only use one of them.

html5shiv
respond
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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