While running the live server, the browser shows a listing directory instead of running CSS code. Why?
Share
Talk Programming , Career, Mental Health, Talk Personal Finance ❤️ Post a query and receive responses ✅
Post a query and receive responses. Ask anything, Ask Mitra ❤️
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Don’t open the CSS file. Try to open the HTML File or the main file then you will not get this type of error. Simply open that HTML file in vs code then Right click on the HTML file and select “Open with Live server”. I am sure this will work.
OR
Follow this video
I hope this will help You 🙂
This is because you clicked on the
open live server
without opening the file which you want to live in local hostor you can simply do is
Open your code file -> right click -> open in live server
or you can click your file in dir listing which you want to open
or you can add
/filename.html
in url bar at the endyou can do simply this after starting your live server
Save your file name “index.html” or directly run URL 127:0.0.1:5500/work.html.
or you can follow these two methods if you don’t have any
.html
or.htm
file in your workspace:F1
orctrl+shift+P
and typeLive Server: Open With Live Server
to start a server or typeLive Server: Stop Live Server
to stop a server.(alt+L, alt+O)
to Open the Server and(alt+L, alt+C)
to Stop the server (You can change the shortcut from keybinding). [On MAC,cmd+L, cmd+O
andcmd+L, cmd+C
]go to the html file and right click and then live server it will work
First open html file and open live server.
Right click on html file and open to run on live server easy