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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:43:07+00:00 2026-05-28T06:43:07+00:00

I can’t link external css file to html The HTML file is situated in

  • 0

I can’t link external css file to html

The HTML file is situated in folder “header”, css file header.css is also situated in this folder.

Heres the css code:

@charset "UTF-8";

h1 {
    font-size: 250%;
}

Here is the html:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="header.css" />
        <title> <?php echo $title; ?> </title>
    </head>
    <body>
        <h1> <?php echo $header; ?> </h1>
        <div id = 'myOrgButton'>
            <form method="post" action="../../controllers/MyOrganisation">
                <input type="submit" value="My Organisation" />
            </form>
        </div>
        <div id = 'logoutButton'>
            <form method="post" action="../../controllers/<?php echo $action; ?>">
                <input type="submit" value="<?php echo $action; ?>" />
            </form>
        </div>
        <hr/>

The php is here because this is header is php view that i am loading from controller.
I tried defining absolute path, placing css in different folders, nothing works.

When the css is embedded in html with tag it works perfectly, so i guess the problem is with linking.

Update
I’ve added full html code.

  • 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-28T06:43:08+00:00Added an answer on May 28, 2026 at 6:43 am

    Since this is a view from code igniter, the file system path to that folder is probably not the same as the URL path. First of all, you need to put it in a folder that is accessible over http. I’m not familiar with Code Igniter’s implementation of this, but you should have either a “media” or “assets” folder where you put all your CSS and static images. Then, you should make the <link> href relative to the domain.

    So, if your folder structure looks like this and your “assets” folder is at the root:

    assets/
      images/
      css/
        header.css
    

    Your CSS include should look like this:

    <link rel="stylesheet" type="text/css" href="/assets/css/header.css" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone tell me how to open Auto CAD file in HTML5? Is this
can any one tell me how can change this java code into objective c.is
Can anyone recommend a good library for generating an audio file, such as mp3,
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can somebody help me convert this VB function to Perl (PHP, Ruby or Python
Can I style a link on an iPhone when the user presses and holds
Can i get the source code for a WAMP stack installer somewhere? Any help
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
can anyone tell me why this doesn't work? db = openOrCreateDatabase(database.db, SQLiteDatabase.CREATE_IF_NECESSARY, null); db.setLocale(Locale.getDefault());
Can't work out a way to make an array of buttons in android. This

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.