Welcome Guest, Not a member yet? Register   Sign In
HELP: subdomain how would i access my images?
#1

[eluser]dippy[/eluser]
Hello. I need some help/advice here with showing an image.

I have a subdomain which looks like this: http://subdomain.domain.com

Now i have my base_url() is set like this:
Code:
$config['base_url'] = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 's' : '')
                      .'://'.$_SERVER['HTTP_HOST'].str_replace('//','/',dirname($_SERVER['SCRIPT_NAME']).'/');

Now, in my CSS file that is in "assets/css" the css should be the following:
Code:
#header_image {
    position:relative;
    background:url('../images/hometop.jpg') no-repeat;
    height:134px;
}
where my images are in "assets/images"
CORRECT?


Now, I am testing some css that uses an image and I am using a css/style sheet inside my view file. How would I show an image then?

Here is my file structure:
-root
-application
-codeigniter folders
-assets
-images
-css
-images
-system
-.htaccess
-index.php
-robots.txt

Should it be the following:
Code:
#header_image {
    position:relative;
    background:url('../../assets/images/hometop.jpg') no-repeat;
    height:134px;
}

Please help me and let me know if i am correct at all here?? If i am not please let me know where I went wrong because my image is not showing up.

Any help would be great!!

Thank you in advance!


Messages In This Thread
HELP: subdomain how would i access my images? - by El Forum - 09-10-2012, 10:48 PM
HELP: subdomain how would i access my images? - by El Forum - 09-10-2012, 11:39 PM
HELP: subdomain how would i access my images? - by El Forum - 09-11-2012, 12:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB