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 keil的map文件中Image component sizes各项意思
  • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
  • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
  • ¥15 划分vlan后,链路不通了?
  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)