473,326 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

css file doesn't load from css/file.css

82
Hi,

I have a starnge behaviour if the css file exists in the same directory as the html file it is working but if I move the css file into /css directory which exists in under the html file directory the css file doesn't load, any sugesstions

i.e.
work

<link rel="stylesheet" type="text/css" href="facebox.css" media="screen" />

Does not work:

<link rel="stylesheet" type="text/css" href="css/facebox.css" media="screen" />


Are there any rules howtoinclude a css file.
May 8 '08 #1
6 2372
Plater
7,872 Expert 4TB
Does making it:

<link rel="stylesheet" type="text/css" href="./css/facebox.css" media="screen" />

Work?
Is the directory css or Css or CSS? Case matters sometimes.
May 8 '08 #2
drhowarddrfine
7,435 Expert 4TB
I don't see anything wrong with what you are doing.
May 8 '08 #3
Death Slaught
1,137 1GB
Do you have a link to a test site? If so please post it so we can help you further.

Thanks, Death
May 8 '08 #4
Hello frnd,
you'll modify the href path. Because two types of path setting is available. One is absolute. for exp. c:/css/facebox.css. Another one is relative. for exp. facebox.css. will you try first type
Best Of Luck
Hi,

I have a starnge behaviour if the css file exists in the same directory as the html file it is working but if I move the css file into /css directory which exists in under the html file directory the css file doesn't load, any sugesstions

i.e.
work

<link rel="stylesheet" type="text/css" href="facebox.css" media="screen" />

Does not work:

<link rel="stylesheet" type="text/css" href="css/facebox.css" media="screen" />


Are there any rules howtoinclude a css file.
May 15 '08 #5
harshmaul
490 Expert 256MB
about absolute.....

you will not be able to reference a CSS file on a local drive.... the absolute CSS you will need is going to be like http://domain.com/css/facbox.css....

if your CSS doesn't work try using it on the page to make sure you havn't written coded it wrong.

hope that helped!
May 16 '08 #6
harshmaul
490 Expert 256MB
PS....

you could try this.....

<style type="text/css">
@import 'css/facebox.css';
</style>
May 16 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Dale | last post by:
How to recognize whether file has XML format or not? Here is the code segment: XmlDocument* pDomDocument = new XmlDocument(); try { pDomDocument->Load(strFileName ) ; } catch(Exception* e) {
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
14
by: MsNews | last post by:
Hi, I'm creating a free Icon library in C# with source code include, it already support .ico/.dll../exe and I'd like to support .ICL format too, I need to load a file .ICL (Icon Library) that...
12
by: SAL | last post by:
Hello, Is it possible to read a CSV from the Client, and bind my Datagrid to the data in the CSV file without uploading the file to the Server first? I have tried and in Debug mode on my...
5
by: mmcd79 | last post by:
I built a VB.net application that makes use of a machine level DB connection string setting, and a user level starting location setting. The machine level setting and the default user based...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.