![]() |
I am having a weird issue with CSS. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: I am having a weird issue with CSS. (/showthread.php?tid=52111) Pages:
1
2
|
I am having a weird issue with CSS. - El Forum - 05-29-2012 [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! I am having a weird issue with CSS. - El Forum - 05-29-2012 [eluser]Aken[/eluser] Or he doesn't have the URL helper loaded, and it threw a notice error which messed up the HTML. I am having a weird issue with CSS. - El Forum - 05-29-2012 [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! I am having a weird issue with CSS. - El Forum - 05-29-2012 [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? I am having a weird issue with CSS. - El Forum - 05-29-2012 [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(); I am having a weird issue with CSS. - El Forum - 05-29-2012 [eluser]InsiteFX[/eluser] CodeIgniter Users Guide - URL Helper I autoload it session and database because I always use them! I am having a weird issue with CSS. - El Forum - 05-30-2012 [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() I am having a weird issue with CSS. - El Forum - 05-30-2012 [eluser]InsiteFX[/eluser] Then you do not have the url_helper loaded! Autoload the url_helper in ./application/config/autoload.php under helpers. I am having a weird issue with CSS. - El Forum - 05-30-2012 [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! |