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 8301739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:07:11+00:00 2026-06-08T17:07:11+00:00

I am trying to fit a stylesheet into view with CodeIgniter, please bare in

  • 0

I am trying to fit a stylesheet into view with CodeIgniter, please bare in mind I am new to CI.

So the stylesheet seems to be included right and I am checking the location, but it still doesn’t seem to change a thing..

this is my view:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

<title>newsletter</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>application/css/style.css" media="screen" />
</head>

<body>
<label for="name"> HI TESTING STYLING & EMAILING</label>
<div id="newsletter_form">
<?php echo form_open('email/send'); ?>

<?php

$name_data = array(
    'name' => 'name',
    'id' => 'name',
    'value' => set_value('name')
);



?>

<p><label for="name">Name: </label> <?php echo form_input($name_data); ?></p>

<p><label for="email">Email Address: </label><input type="text" name="email" id="email" value="<?php echo set_value('email'); ?>">

    <p><?php echo form_submit('submit', 'Submit'); ?></p>
    <?php echo base_url(); ?>application/css/style.css
    <?php echo validation_errors('<p class="error">'); ?>

<?php echo form_close(); ?>
</div>
</body>
</html>

as you can see I am echoing out the url just to make sure and it is correct although it is forbidden.. not sure if this is standard CI procedure or if this is the cause.. I am working on my localhost.

and this is my stylesheet…

label{
display: block;
background: #FFF;
}

.error{

 color: #373737;
}

#newsletter_form{
background: #000;
width: 100px;
}
input[type=submit]{
border: 1px solid #c62828;
background: #aa2929;
color: #e3e3e3;
padding: .5em;
cursor: pointer;    

}
 input[type=submit]:hover{
background: #9c2222;

}

thanks!! I am confused, any help is appreciated 🙂

  • 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-06-08T17:07:12+00:00Added an answer on June 8, 2026 at 5:07 pm

    It is not good practice to put css/js files in your applications folder. Put it in a separate folder called “css” in your root and call it with base_url('css/style.css'); Your root folder should look like this

    -Root
      -application
        (all of your CI files)
      -css
        -Style.css
      -js
        -script.js
        -plugins.js
    

    It is good if CodeIgniter is blocking Application/Css because that means it’s protecting your raw files in your application folder properly 🙂

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

Sidebar

Related Questions

I'm trying to fit a 20x20 table into a view using a programmatically built
I am trying to fit a 2-bit 2-to-1 mux into one LUT. It seems
I find myself always trying to fit everything into the OOP methodology, when I'm
I'm trying to fit an image into a <td> that is smaller than the
im trying to make my images fit nicely into screen without overlapping but no
I am trying fit wordpress into my website, and instead of creating a theme,
I'm trying to fit the information from the G function of my data to
I have installed rapache and I am trying to fit a linear model inside
Based on earlier thread with same argument i am trying to fit a stable
I am trying to implement an NSTextView which resizes to fit its content. I

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.