i've been trying to redo the push menu using notepad and chrome browser. the code was working perfectly when i tried it in codecademy. but when i tried it on notepad and chrome it didnt work. i just copied everything i did in codecademy. i made .html .js and . css files. the display is the same but there is no fa fa bars visible beside the menu and nothing happens when i clicked menu. is there anything i need to download for it to work outside codecademy. thanks!
In your index.html file
you will have to change
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
at the bottom of your
Alternatively, run a server and access it through localhost.
A really simple way to do this if you have python installed is to navigate to the directory with the files and run
python3 -m http.server or
python2 -m SimpleHTTPServer
The problem is that the browser will look for the file with the same protocol as it got the html from, which is directly from the file system in your case. Specifying the protocol, or serving the website with http therefore fixes the problem.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.