Using CSS |
[eluser]Alias M2K[/eluser]
Hi, I now got hit on another roadblock. This time it ain't pagination, but CSS... Could any of tell me how to use CSS with CodeIgniter? Normal ways like linking a CSS ain't working ![]()
[eluser]Giorgio Nordo[/eluser]
In your view put something like Code: <link href="<?php echo site_url(); ?>style.css" rel="stylesheet" type="text/css" /> if style.css is in the view directory. Otherwise, if we assume che style.css is located in the directory views/css, put the following in your view: Code: <link href="<?php echo site_url(); ?>css/style.css" rel="stylesheet" type="text/css" />
[eluser]Eric Barnes[/eluser]
Actually you should use base_url instead. Sometimes people do not remove index for whatever reason and base_url will not include it.
[eluser]Alias M2K[/eluser]
Thanks for that dude ![]()
[eluser]InsiteFX[/eluser]
assets -- css -- js -- img -- media -- ico If you have a structure like this your img in your css file would be ../img/name InsiteFX
[eluser]John_Betong[/eluser]
[quote author="Alias M2K" date="1299397132"]Thanks for that dude ![]() Yes you can put images in any directory and even from an external host. Recently I utilised information from the following link and delighted in the results of relocating thumbnails. http://www.askapache.com/htaccess/apache...mains.html |
Welcome Guest, Not a member yet? Register Sign In |