How to atatch a JavaScript File? ( |
[eluser]tzi0[/eluser]
my view header: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> styles doesnt works too
[eluser]pickupman[/eluser]
You are using relative url's. This will work when there are no url segments. Use this for absolute url: Code: <link rel="stylesheet" type="text/css" href="/css/styles.css" /> Adding the leading slash makes the link always relative to the domain/site root.
[eluser]ELRafael[/eluser]
1. Use the search form. 2. Use base_url() Code: <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>css/styles.css" /> Sometimes (or many times?) I have this kind of structure: http://localhost/project_name or http://project_name.local/ or http://production_env/~project_name/ and finally http://www.project_name.tld/ So,base_url() is a good friend :lol: |
Welcome Guest, Not a member yet? Register Sign In |