unable to connect with CSS using base_URL and link_tag() - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: unable to connect with CSS using base_URL and link_tag() (/showthread.php?tid=68247) Pages:
1
2
|
unable to connect with CSS using base_URL and link_tag() - hafizfarooq - 06-15-2017 I am trying to connect with my CSS using link_tag() but system is not connecting... no errors .. nothing happens Code: <!DOCTYPE html> in controller PHP Code: <?php please help... Farooq RE: unable to connect with CSS using base_URL and link_tag() - donpwinston - 06-15-2017 try <?= link_tag('/assets/css/bootstrap.min.css') ?> RE: unable to connect with CSS using base_URL and link_tag() - natanfelles - 06-15-2017 https://codeigniter.com/user_guide/helpers/url_helper.html Use base_url('assets/css/bootstrap.min.css') RE: unable to connect with CSS using base_URL and link_tag() - hafizfarooq - 06-15-2017 (06-15-2017, 04:54 PM)donpwinston Wrote: try <?= link_tag('/assets/css/bootstrap.min.css') ?> Thanks for reply.. not worked .. RE: unable to connect with CSS using base_URL and link_tag() - Paradinight - 06-15-2017 (06-15-2017, 10:57 PM)hafizfarooq Wrote:(06-15-2017, 04:54 PM)donpwinston Wrote: try <?= link_tag('/assets/css/bootstrap.min.css') ?> white screen? or a page without css? RE: unable to connect with CSS using base_URL and link_tag() - hafizfarooq - 06-15-2017 (06-15-2017, 07:00 PM)natanfelles Wrote: https://codeigniter.com/user_guide/helpers/url_helper.html Thanks for the reply ... not done RE: unable to connect with CSS using base_URL and link_tag() - hafizfarooq - 06-15-2017 The folowing way is working <link rel="stylesheet" type="text/css" href="http://localhost/ciblog/assets/css/bootstrap.min.css"> But when try to get it dynamically.... it not works RE: unable to connect with CSS using base_URL and link_tag() - Martin7483 - 06-16-2017 Do you have your base url set in your config? PHP Code: /* RE: unable to connect with CSS using base_URL and link_tag() - hafizfarooq - 06-16-2017 Thanks Martin for the reply. I did it but not resolved the issue. base_url = 'localhost/ciblog' RE: unable to connect with CSS using base_URL and link_tag() - InsiteFX - 06-16-2017 You need to add the ending slash / onto the base url PHP Code: $config['base_url'] = 'localhost/ciblog/'; |