我一个样式表添加到笨:笨并添加样式
<head>
<meta charset="utf-8">
<title>Site Administrator</title>
<link rel="stylesheet" href="../../css/administrator.css" type="text/css" ></link>
</head>
但规则的arent增加。我去了两个目录,并去css .. href的方向是正确的..我在netbeans中使用自动完成功能..但为什么没有规则添加到页面?它是codeigniters问题吗?
我的样式表中的规则:
#container
{
margin: 0px auto;
width:50%;
background-color: #99BC99;
}
#container:first-child
{
text-align: center;
}
#heading
{
text-align: right;
}
h2
{
float:right;
margin-right: 130px;
}
a
{
text-decoration: none;
}
我的HTML:
<div id="container">
<h1>ממשק מנהל</h1>
<div id="heading">
<h2>
<?php echo anchor('news/local/123', 'צור נושא', 'title="News title"'); ?>
</h2>
<h2>
<?php echo anchor('news/local/123', 'הוסף אמייל', 'title="News title"'); ?>
</h2>
<h2>
<?php echo anchor('news/local/123', 'שנה שם וסיסמה', 'title="News title"'); ?>
</h2>
</div>
UPDATE:
这是它给了我:
This is what it gives me: <link rel="stylesheet" href="http://localhost/finance_site/index.php/css/administrator.css" />
每次,我这样做:
<link rel="stylesheet" href="<?=site_url('css/administrator.css');?>" />
好吧,我知道了,它是这样的:
<link rel="stylesheet" href="http://localhost/finance_site/css/administrator.css" />
有没有办法重新写它,这将是一个相对链接到代码点火器......或者至少更便携?
您提供的信息太有限 – safarov 2012-03-28 08:20:03
您需要多少信息? – BlackFire27 2012-03-28 08:22:05
什么是您正在使用的文件夹结构? CodeIgniter和CSS在哪里坐? – cchana 2012-03-28 08:23:12