Last Updated
Viewed 23 Times

Hello! Im with my friends are working on the same HTML, and CSS file in VS code with extension "Live Server". Html preview is working fine, but CSS is working only for host. How to solve this problem ? We wanna to work on the same file at the same time, and that CSS with HTML will working.

I'm trying to create a vscode extension and the goal is to display a webview with a extern html and css.
Loading and setting the html works but unfortunately the css won't get load.

Creating webview,loading html and setting :

var resultPanel = vscode.window.createWebviewPanel("test", "TestWebView", vscode.ViewColumn.One, {});
    fs.readFile(path.join(context.extensionPath,'src','languageMenue.html'),(err,data) => {
          if(err) {console.error(err)}
          resultPanel.webview.html = data;

This works, inside the html the css get loaded like that :

<meta charset="UTF-8">
<link rel="stylesheet" href="">
<link rel="stylesheet" type="text/css" href="theme.css">

The css is in the same folder as the html (inside the src folder of my the extension project)

What am I missing? Why the css won't get load?

I am not using git because I am under the constraints of a hosted CMS and can not SSH into their server.

I am trying to get ftp-simple to work in vs code so that I can edit a remote file save it and I can see the changes in the browser. Currently It can see the files on the remote server but wen I click on the files I can't see the content.

In my config file I have only input the authorization for the sftp and nothing more do I have to do something else in order to actually see the content?

This is what it looks like when I try to open the file. As you can see the file tree to the left is fully visible though. enter image description here

Maybe someone else has had this problem before...

I'm using VSCode 1.8 on a Mac. When laying out my HTML first, I might add in class names that I have not yet created in my CSS (for example <div class="foo">). When I go to my CSS file and begin typing ".f" there is no autocomplete for ".foo". I realize this is probably not a standard feature. Of course if I first create ".foo" in my CSS then I can get autocomplete for it in my HTML. But that's not always how I work (first reference unused class in HTML, then create the class in CSS). I looked around the marketplace for an extension that will recognize unused CSS classes in the HTML and them provide an autocomplete for them in the CSS file, but found nothing.

Did I just miss it? Does anyone know if something like that exists? Thank you.

Similar Question 5 (6 solutions) : How to enable VS Code HTML error checking / validation?