Customizing an ASP.NET Core MVC website
Now that you've reviewed the structure of a basic MVC website, you will customize it. You have already added code to retrieve entities from the Northwind
database, so the next task is to output that information on the home page.
More Information: To find suitable images for the eight categories, I searched on a site that has free stock photos for commercial use with no attribution at the following link: https://www.pexels.com/
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\css
folder, open thesite.css
file. - At the bottom of the file, add a new style that will apply to an element with the newspaper ID, as shown in the following code:
#newspaper { column-count: 3; }