I am having a weird issue with CSS. |
[eluser]InsiteFX[/eluser]
Try leaving the base_url blank '' CodeIgniter will try to figure it out for you. You can also try this: Code: <link rel="stylesheet" href="<?php echo base_url('css/style.css'); ?>"> If the css is working in the other browsers but messing up then it is a browser problem, some browser you neeed to make adjustments on the css for it work on all. Like with IE you usally end up create a special css file just for it!
[eluser]Aken[/eluser]
Or he doesn't have the URL helper loaded, and it threw a notice error which messed up the HTML.
[eluser]InsiteFX[/eluser]
True! Here is an example with chrome on the CI forums here it will take and drop down the advanced search button below the search text field!
[eluser]codelogic[/eluser]
[quote author="InsiteFX" date="1338357401"]Try leaving the base_url blank '' CodeIgniter will try to figure it out for you. You can also try this: Code: <link rel="stylesheet" href="<?php echo base_url('css/style.css'); ?>"> If the css is working in the other browsers but messing up then it is a browser problem, some browser you neeed to make adjustments on the css for it work on all. Like with IE you usally end up create a special css file just for it! [/quote] Okay, so this does not work, with my base_url typed in and left blank. I wonder why. Also, Aken, this Code: <link rel="stylesheet" href="/main/test/CI/css/style.css?<?php echo time(); ?>"> worked, it is displaying correctly across all browsers. Edit: What do you mean by URL helper loaded?
[eluser]InsiteFX[/eluser]
Do a view source in your browser and look at that link to see how ci did it for you! echo base_url();
[eluser]InsiteFX[/eluser]
CodeIgniter Users Guide - URL Helper I autoload it session and database because I always use them!
[eluser]codelogic[/eluser]
[quote author="InsiteFX" date="1338358278"]Do a view source in your browser and look at that link to see how ci did it for you! echo base_url(); [/quote] I get this error, Fatal error: Call to undefined function base_url()
[eluser]InsiteFX[/eluser]
Then you do not have the url_helper loaded! Autoload the url_helper in ./application/config/autoload.php under helpers.
[eluser]codelogic[/eluser]
[quote author="InsiteFX" date="1338362522"]Then you do not have the url_helper loaded! Autoload the url_helper in ./application/config/autoload.php under helpers. [/quote] Ah, yes, that was it! |
Welcome Guest, Not a member yet? Register Sign In |