Welcome Guest, Not a member yet? Register   Sign In
Using CSS
#1

[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 Sad
#2

[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" />
#3

[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.
#4

[eluser]Alias M2K[/eluser]
Thanks for that dude Wink Just asking, can I place the images where ever I want and then mention its full url while using it in the CSS?
#5

[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
#6

[eluser]John_Betong[/eluser]
[quote author="Alias M2K" date="1299397132"]Thanks for that dude Wink Just asking, can I place the images where ever I want and then mention its full url while using it in the CSS?[/quote]

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
 
 
 




Theme © iAndrew 2016 - Forum software by © MyBB