For some strange reason my css does not seem to connect Html
_layout.cshtml:
Site.css
- >
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>@ViewData["Title"] - test4title>
- <link rel="stylesheet" href="~/css/site.css" />
- head>
- <body>
- <div id="Navbar">
- <div id="Navcentered">
- <div class="Navbuttons"> Homediv>
- <div class="Navbuttons"> Uploaddiv>
- <div class="Navbuttons"> Logindiv>
- div>
- div>
- <div class="Thecontainer">
- @RenderBody()
- div>
- <footer class="border-top footer text-muted">
- <div class="container">
- © 2021 - test4 - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacya>
- div>
- footer>
- body>
- html>
- body {
- margin-bottom: 60px;
- background-color:red;
- }
- .footer {
- position: absolute;
- bottom: 0;
- width: 100%;
- white-space: nowrap;
- line-height: 60px;
- }
- .container-field{
- width:100%;
- height:auto;
- background-color: white;
- border-radius: 10px;
- box-shadow: 5px 5px 15px #929292;
- display: flex;
- flex-wrap: wrap;
- }
- .card{
- height: 500px;
- width: 220px;
- margin: 15px;
- border-radius:10px;
- margin-top:20px;
- box-shadow: 5px 5px 15px #929292;
- text-align:center;
- }
- .card-image {
- width: 100px;
- height: 210px;
- margin: 10px;
- background-repeat: no-repeat;
- background-size: contain;
- }
- .Thecontainer {
- width: 60%;
- padding-right: 15px;
- padding-left: 15px;
- margin-right: auto;
- margin-left: auto;
- height: 600px;
- background-color: green;
- }
- #Navbar{
- height:200px;
- background-color:green;
- width:100%;
- }
- #Navcentered{
- width:70%;
- }
- .Navbuttons{
- width:auto;
- margin:10px;
- padding:10px;
- height: 100%;
- background-color:blue;
- }
- @model IEnumerable<test4.Models.Product>
- @{
- ViewData["Title"] = "Index";
- }
- <h1>storeh1>
- <h2>list here: @ViewBag.Messageh2>
- <h2>last: @ViewBag.Message2h2>
- <h2>count: @ViewBag.counth2>
- <form asp-controller="Products" asp-action="Index">
- <p>
- Title: <input type="text" name="SearchString" />
- Description: <input type="text" name="Description" />
- <input type="submit" value="Filter" />
- p>
- form>
- <div class="container-field">
- @foreach (var item in Model)
- {
- <div class="card">
- <div class="card-image"> <img src="~/Images/Example.jpg" alt="example Picture" width="200" height="200" /> div>
- <h2> @Html.DisplayFor(modelItem => item.Title)h2>
- <h3> Price: @Html.DisplayFor(modelItem => item.Price)h3>
- <p> @Html.DisplayFor(modelItem => item.ProductDescription)p>
- <p> stocks: @Html.DisplayFor(modelItem => item.Stock)p>
- <a asp-action="Details" asp-route-id="@item.Id">Viewa>
- div>
- }
- div>
Sachin SinghPosted Mar 6, 2021, 4:30 AM