TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Paul Drake
NA
37
4.5k
Browser not reading style sheets error404
Dec 24 2020 5:01 PM
I have a foreach loop inside of a div tag with container as well as a div with class row. When I run the page in a browser for some reason the div tags don't render the way I want them to. I looked at the console in the browser and my style sheets aren't being reading correctly. I'm getting an error404 message.
@{
Layout =
null
;
MovieResults movieResults = ViewData[
"movies"
] as MovieResults;
}
<!doctype html>
<html lang=
"en"
>
<head>
<meta charset=
"UTF-8"
/>
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1"
/>
<title>Movie Streaming Availability App</title>
<link rel=
"stylesheet"
type=
"text/css"
href=
"lib/bootstrap/dist/css/bootstrap-grid.css"
>
<link rel=
"stylesheet"
type=
"text/css"
href=
"lib/bootstrap/dist/css/bootstrap.css"
>
<link rel=
"stylesheet"
type=
"text/css"
href=
"lib/bootstrap/dist/css/bootstrap-reboot.css"
>
<link rel=
"stylesheet"
type=
"text/css"
href=
"css/site.css"
>
</head>
<body>
<main>
<div
class
=
"container"
>
<div
class
=
"row"
>
@foreach (
var
movie
in
movieResults.Results)
{
<div
class
=
"col-md-3"
>
<img src=
"https://image.tmdb.org/t/p/w300/@movie.PosterPath"
alt=
"@movie.Title"
>
<label>@movie.Title</label>
</div>
}
</div>
</div>
</main>
<footer>
<script src=
"lib/jquery/dist/jquery.js"
></script>
<script src=
"lib/bootstrap/dist/js/bootstrap.bundle.js"
></script>
<script src=
"~/js/site.js"
asp-append-version=
"true"
></script>
</footer>
</body>
</html>
Reply
Answers (
2
)
CSS Bootstrap not working properly in ASP.net core mvc project
Not sure how to convert int to C# object