...

/

Customizing an ASP.NET Core MVC Website

Customizing an ASP.NET Core MVC Website

Learn about the customization of an MVC website by defining styles, setting up images, and using Razor syntax for dynamic content.

Now that we’ve reviewed the structure of a basic MVC website, we will customize and extend it. We 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 7777 products in the Northwind database. To efficiently use space, we want to show the list in three columns. To do this, we need to customize the style sheet for the website:

Step 1: In the wwwroot\css folder, open the site.css file.

Step 2: At the bottom of the file, add a new style that will apply to an element with the product-columns ID, ...