473,761 Members | 5,848 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

82 New Member
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.c ss" 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 2388
Plater
7,872 Recognized Expert Expert
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 Recognized Expert Expert
I don't see anything wrong with what you are doing.
May 8 '08 #3
Death Slaught
1,137 Top Contributor
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
nanaveraa
9 New Member
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.c ss" 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 Recognized Expert Contributor
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 Recognized Expert Contributor
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
4324
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
5719
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 of a Microsoft book, "Visual Basic,Net Step by Step" in Chapter 18. All but the bottom two subroutines will open a text file, and then allow me to use the above controls, example 1. The bottom two subroutines will print a graphic file, example...
14
5232
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 basically it is a 16-bit dll and then after that I can extracts and insert icons inside. I tried the only function in Win32API left for 16bit (LoadModule), it loads the library but Windows starts to give strange message boxes, as "Not enough...
12
2910
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 workstation it works fine, but when I publish the page on our DEV server it doesn't fine the CSV file from the client. Has anyone done this before? If so, how do I do it? I'm new to ASP.net so
5
7865
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 setting is of course stored in the app.exe.config file located in the same directory as the exe. Upon closing the form, I save the user setting which then creates a user.config file in the appdata directory in my profile. This is all well and good....
0
9336
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3866
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.