Common pitfalls
We have covered a lot in this chapter. Many of these things will serve as a basis for future projects within this book and beyond. Now we will look at some of the common problems you may face.
Navigation bar height variance on mobile devices
We implemented padding in our body to overcome the fact that the navigation bar, when fixed, was covering some of the content. Our current project works the same in this regard on all devices, but it is common for navigation bars to change size depending on the device/browser size. This can lead to the same problem; solving this can be done using media queries to check which device the website is running on.
Also, some websites may even change the size of the navigation bar on the same device/browser size. This can be due to the user scrolling and the navigation bar becoming smaller as a result. This can be very appealing visually, but media queries will be necessary to accommodate for this change.
Navigation bar button anchoring
You may have...