Navin Rauniyar
Navin Rauniyar

Reputation: 10525

responsive site in joomla with bootstrap

I'm going to learn bootstrap for responsive site design and downloaded it and set the followings in joomla 2.5:

  1. unzipped the bootstrap package and renamed it with assets
  2. copied the assests folder inside the template (beez5)
  3. defined the following in <head> section of index.php:


<meta charset="utf-8">
    <jdoc:include type="head" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/css/bootstrap.css" type="text/css" media="screen" />

To test it's css I defined background-color: red !important; to container-fluid in bootstrap.css and added a class container-fluid in main div in index.php but I think the css is not working. I mean bootstrap css is not loading.

Question: How to implement bootstrap css for responsive site in joomla 2.5?

Upvotes: 1

Views: 268

Answers (1)

daniel__
daniel__

Reputation: 11845

All you need is here: Joomla Communite Magazine, Issue 2012 August.

You have three options for creating a new template

  1. start from scratch with creating a folder and all the necessary files (the article is focused in this point)
  2. install a starter theme and modify it
  3. copy an existing template and modify it

If you are interested in Out-of-box solution.


PS: to load css files, something like this should work:

<link rel="stylesheet" href="<?php echo $this->baseurl ?>/templates/<?php echo $this->template; ?>/assets/css/bootstrap.css" type="text/css" media="screen" />

$this->baseurl contains the location within your domain that Joomla is installed at.

Upvotes: 1

Related Questions