USER420
USER420

Reputation: 337

Why will netbeans not run my CSS file?

So i was doing some basic formating to my html page using CSS, and when i ran it on netbeans nothing happened. I double checked the <link> on my html page and it was correct.

So kind of confused now I went to the folder where netbeans project is saved and copied the files to a new folder on the desktop. I made the same edits on my css file using notepad++, and then ran my index.html file (double clicked and it opened with browser) and viola, changes i made appeared. Has anyone else experienced this encounter? Why will it not work on netbeans? Am i missing a plugin or something?

Upvotes: 0

Views: 6067

Answers (1)

Mohamed Islam
Mohamed Islam

Reputation: 752

The CSS file first need to be listed on the directory tree on the left side of Netbeans. If its not there, the program won't run the css file that you're trying to include in the html.

It'll also help if you put the

your_css.CSS

In a sub folder... e.g. Folder Name: CSS

and then have your CSS file in there.

Then you should have this to link the css to the HTML document

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

Upvotes: 1

Related Questions