• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hellp CSS and JS

#1
On the main page of http://127.0.0.1/ 
styles work but if I passto other page of http://127.0.0.1/pages/login styles disappear

application\views\view_index.php

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta name="description" content="Vid Serials" />
<
title><?php echo $page_title;?></title>
<!-- // Stylesheets // -->
<link href="<?php base_url(); ?>theme/css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="<?php base_url(); ?>theme/css/ddsmoothmenu.css" />
<!-- // Javascript // -->
<script type="text/javascript" src="<?php base_url(); ?>theme/js/jquery.min.js"></script>
<script type="text/javascript" src="<?php base_url(); ?>theme/js/ddsmoothmenu.js"></script>
<script type="text/javascript" src="<?php base_url(); ?>theme/js/menu.js"></script>
<script type="text/javascript" src="<?php base_url(); ?>theme/js/contentslider.js"></script>
<script type="text/javascript" src="<?php base_url(); ?>theme/js/cufon-yui.js"></script>
<script type="text/javascript" src="<?php base_url(); ?>theme/js/Tahoma_400-Tahoma_700.font.js"></script>
</head>
<body>
    <div id="wrapper_sec">
        <!--Header -->
        <?php include 'includes_header.php'?>
        <!--Header end -->    
    <!--Content Sec -->
    <div id="content_sec">
            <!--Main Section-->
                <?php 
                    $page_name
.=".php";
 
                   include $page_name;
 
               ?>     
            <!-- RIGHT_BLOCK-->
            <?php include 'right_block.php'?>
            <!-- RIGHT_BLOCK_END-->
            
        <!-- movie ads-->
        
        <!-- movie ads end -->
    </div> 
 <div class="clear"></div>
</div>
<!-- bottom section-->
<?php include 'includes_footer.php'?>
<!-- bottom section end-->
</div>
</body>
</html> 
application\views\pages\login.php

PHP Code:
<div class="col1">
    <!--
Most Popular -->
    <
div class="mostcontainer">
        <
div id="content"         
            
<div id="wrapper">
                <
div id="steps">
                    <?
php echo form_open('index.php?install/do_install' , array('id' => 'formElem' 'name' => 'formElem'));?>
                    <fieldset class="step">
                        <legend>Авторизация на сайте</legend>
                        <p>
                        <label for="name">Логин</label>
                        <input id="db_name" name="db_name" type="text" AUTOCOMPLETE=OFF />
                        </p>
                        <p>
                        <label for="phone">Пароль</label>
                        <input id="db_password" name="db_password" type="text" AUTOCOMPLETE=OFF />
                        </p>
                        <p class="submit">
                        <button id="registerButton" type="submit">Войти</button>
                        </p>
                    </fieldset>
                    <?php echo form_close();?>
                </div>
                <!--steps finishes here-->
            </div>           
        </div>
    </div>
    <div class="clear"></div>
</div> 


application\controllers\Pages.php



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

class 
Pages extends CI_Controller {

    function 
login($mode NULL)
    {
 
          $page['page_name'] = 'pages/login';
     
  $page['page_title'] ='Авторизация';
     
  $this->load->view('view_index',$page);
    }

application\controllers\[b]Video.php[/b]

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

class 
Video extends CI_Controller {

    public function 
index($page_name='home',$submit='none')
    {
     
   $page['page_name'] = $page_name;
     
   $page['submit']    = $submit;
     
   $page['page_title'] = 'Главная';
     
   $this->load->view('view_index',$page);
    }

prompt me how to do what CSS worked on all pages please
Reply

#2
Change this line
Code:
<link href="<?php base_url(); ?>theme/css/style.css" rel="stylesheet" type="text/css" />
to
Code:
<link href="<?php echo base_url(); ?>theme/css/style.css" rel="stylesheet" type="text/css" />

Apply the same to <script ...> tags
Reply

#3
(11-26-2016, 05:52 PM)pdthinh Wrote: Change this line
Code:
<link href="<?php base_url(); ?>theme/css/style.css" rel="stylesheet" type="text/css" />
to
Code:
<link href="<?php echo base_url(); ?>theme/css/style.css" rel="stylesheet" type="text/css" />

Apply the same to <script ...> tags

thank you to you and successes helped
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.