Customizing an ASP.NET Core MVC website
Now that you’ve reviewed the structure of a basic MVC website, you will customize and extend it. You have already registered an EF Core model for the Northwind database, so the next task is to output some of that data on the home page.
Defining a custom style
The home page will show a list of the 77 products in the Northwind database. To make efficient use of space, we want to show the list in three columns. To do this, we need to customize the stylesheet for the website:
- In the
wwwroot\cssfolder, open thesite.cssfile. - At the bottom of the file, add a new style that will apply to an element with the
product-columnsID, as shown in the following code:#product-columns { column-count: 3; }
Setting up the category images
The Northwind database includes a table of eight categories, but they do not have images, and websites look better with some colorful pictures:
- In the...