linking css problem |
[eluser]brian88[/eluser]
im a newbie at code igniter. and i have a problem getting my css to work right. in my VIEW i have Code: <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/main.css" /> but this works, only for my home page though (http://localhost:8888/ci/index.php) Code: <link rel="stylesheet" type="text/css" href="application/views/css/main.css" /> im autoloading my url helper my config, base url is http://localhost:8888/ci/index.php these page loads, but css doesnt work. http://localhost:8888/ci/index.php/main_.../index.php http://localhost:8888/ci/index.php/main_.../about.php
[eluser]InsiteFX[/eluser]
Create an assets folder in your root where index.php is. Assets -- css -- img -- images -- js -- media Code: <link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/ css/main.css" /> InsiteFX
|
Welcome Guest, Not a member yet? Register Sign In |