Implementing the light box
We will continue with the code from the preceding chapter to finish our photo gallery with an awesome light box.
We will use a Bootstrap feature called modals, which is an awesome and simple way of opening a box within the website; this is what will display our image to the user.
Adding a simple modal
First, we will open an empty modal when the thumbnail is clicked from the gallery. Add the following code after all other HTML code, even outside of the container:

Firstly, I'm sure you're wondering why we added it outside of the container and not within it, considering everything thus far in the book has been within. The main reason for this is due to the code not being part of the main visible content, so it doesn't need to be within the container. It can be placed within the container, but honestly there is no need. Before we go over what each line of code does, let's take a look at the end result:

No, you're not mistaken; the website looks exactly the same. This is...