Welcome Guest, Not a member yet? Register   Sign In
Problem with image and css source
#1

[eluser]Tanvir[/eluser]
I have tried the following to work with my image/css/js source-

1. Using base url
Code:
<head>
<base href="http://localhost/codeigniter/application/views/" />
<link href="banner/mainLayout.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="banner">Content for  id "banner" Goes Here</div>
<img src="images/images.jpeg">
&lt;/body&gt;
&lt;/html&gt;
2.Passing base_url() from controller class and then adding image/css folder path to it as a source.
3. using full url - www.mydomain.com/application/views/images/image.jpg

but I cant be sure which is d right process to do it. I also tried using "Asset helper" plugin.I put the asset folder in d root directory and used- image_asset('images.jpg') in the view file but nothing worked.

One more thing is confusing me. Can I use all the class,helper and library in all the controller AND view files. I mean can they be used anywhere or only in controller classes. If not which is to use where.

And what is d difference between class and library ...
Pls help




Theme © iAndrew 2016 - Forum software by © MyBB