dongmei9203 2016-02-01 09:55
浏览 32

css没有在codeigniter上工作

i recently debugged all the errors on the connection of my headers css and js, there are no errors anymore, but css still isnt working. but the format of my view is changed, but not as i wanted.

login.php

<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Login extends CI_Controller {


    public function index(){


        $data['main_content'] = 'login_view';
        $this->load->view('includes/viewtemplates',$data);



    }

viewTemplates.php

<?php $this->load->view('includes/header'); ?>
<?php $this->load->view($main_content); ?>
<?php $this->load->view('includes/footer'); ?>

header.php

<!--DOCTYPE html-->

<html lang="en">


<head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Login</title>
        <link rel="stylesheet" href="<?php echo base_url();?>public/css/bootstrap-responsive.min.css" type="text/css" media="screen" title="no title" charset="utf-8">
        <link rel="stylesheet" href="<?php echo base_url();?>public/css/style.css" type="text/css" media="screen" title="no title" charset="utf-8">

        <script src="<?php echo base_url();?>public/js/jquery.js"></script>
        <script src="<?php echo base_url();?>public/js/bootstrap.js"></script>
</head>

<body>

<header>
</header>

bootstrap-responsive.min.css

 body {

    background: #F0F0F0 ;
    margin: 0;
    padding: 0;
    font-family: 'times-new roman';

 }

#login_form {

    width: 300px;
    background: 3333FF;
    border: 1px solid white;
    margin: 100px auto 0;
    padding: 1em;
    -moz-border-radius:  4px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}

h1, h2, h3, h4, h5 {

    margin-top = 0;
    text-align: center;
    color: 000033;
    text-shadow: 0 1px 0;
}
  • 写回答

2条回答 默认 最新

  • doumeng3345 2016-02-01 10:06
    关注

    there is a problem in website images it will not load correctly
    you can use base tag for this(you need to add <base> tag in <head>) ...

    <base href="<?php echo base_url();?>public/">
    

    and make sure image floder is in public directory

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分