From the course: Learning Next.js

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Adding global styles

Adding global styles

- [Instructor] Next.js provide with built-in CSS support in many ways to apply common and global CSS settings across the application. The process is very simple, and I'm very glad to show you how to do it. First, within the directory Styles, you're going to find the file globals.css. As the name indicates, globals, this is where you're going to write all the CSS to apply across the entire application. Then we're going to add the same file to the scope of the entry points of the application that you're going to find within the pages directory. And this will allow to include all the CSS available in globals.css to the entire application. In the same location, pages/_app.js, it is possible to add a style sheet from a third-party library, for example, bootstrap.css. Bootstrap is an HTML and CSS library with out-of-the-box user interface components to create responsive webpages. In that case, all the CSS settings and built-in…

Contents