My images and glyphicons are not showing, my paths are right though, how can I solve this problem?

Viewed 109

I'm trying to add an image to my navbar and a glyphicon to the logout button, but none of these are showing up.

The upper navbar is what my navbar is looking like right now, beneath this navbar is the navbar it's supposed to look like.

This is what the navbar is looking like right now

This is what the navbar has to look like

This is the code and file structure of the project

Edit: enter image description here

3 Answers

Regarding the "glyphicon" as stated in the comments it is no longer supported by bootstrap 4, as an alternative i would suggest using Font Awesome or Bootstrap Icons

For the second question (the image not showing), a small change need to be done to the image path, this will do the trick: <img src="../images/logo_vesta.png"/> the addition of ../ before the "images" folder means that you need to exit the current folder "Header" before entering the "images" folder.

Bootstrap 4 has dropped support for Glyphicons. This is the reason glyphicons are not showing up on your website. You can use other freely available icon libraries such as Google Material Design Icons and Font Awesome to use.

As for the image, I don't think you are including the correct source to the image. The 'images' folder is one level up in the directory that you're currently working on. So, the correct source for the image should be:

<img src="../images/logo_vesta.png" alt="logo">

Including the above image tag should do what you're trying to achieve.

Related