1

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?

4

1 回答 1

1

您所需要的都在这里:Joomla Communite 杂志,2012 年 8 月发行

您可以通过三个选项来创建新模板

  1. 从头开始创建一个文件夹和所有必要的文件(本文重点关注这一点
  2. 安装入门主题并进行修改
  3. 复制现有模板并对其进行修改

如果您对开箱即用的解决方案感兴趣。


PS:要加载 css 文件,这样的事情应该可以工作:

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

$this->baseurl包含在您的域中安装 Joomla 的位置。

于 2013-08-20T09:27:23.050 回答