Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6961573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:32:50+00:00 2026-05-27T15:32:50+00:00

I am setting up a local CodeIgniter development environment on my windows machine using

  • 0

I am setting up a local CodeIgniter development environment on my windows machine using xampp. I am having a little bit of trouble with the css files. I am guessing that I need to configure my application’s path somewhere.

The development url is this (this is routed to the home page ):

localhost/my_app

I am linking my stylesheet like this

<link rel="stylesheet" href="/css/style.css" type="text/css" />

on a production server this works just fine, but the css will not load locally because it seems to be linking to localhost/css/style.css instead of localhost/my_app/css/style.css.

when I change the link to this, it works:

<link rel="stylesheet" href="/my_app/css/style.css" type="text/css" />

this link works, but still will not load the background-image:url('/images/image.png') I am using.

I don’t want to code all of my paths with my_app/directory_i_want_to_access because then I will have to go back and change them whenever I push to production.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:32:51+00:00Added an answer on May 27, 2026 at 3:32 pm

    Try:

    <link rel="stylesheet" href="<?php echo base_url(); ?>/css/style.css" type="text/css" />
    

    For image links within CSS, say this is your folder structure

    / Assets
    | - /images
    | - | - image.png
    | - /css
    | - | - / style.css
    

    Just link to the images relative to the CSS file, so in this case, it’ll be ../images/image.png

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've finished developing an app using CodeIgniter in my local machine, and moved it
I was setting up a Rails 3 environment on my local machine with MySql5
By default in windows application setting are saved in this directory: %USERPROFILE%\Local Settings\Application Data\<Company
I'm new to cakephp and I'm having some problems with setting up a local
Codeigniter has its 'ENVIRONMENT' setting such that when in a production environment, by changing
I just finished setting up a local site for development with apache2 on OSX,
Has anyone had any issues while setting up their local development system with Mamp
What is the recommended way of handling settings for local development and the production
I have parsed a java.util.Date from a String but it is setting the local
I've been working on a case using Pyrocms, a CI-based CMS, on my local

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.