Skip to content

Commit

Permalink
Fixed image stylings in movie details page
Browse files Browse the repository at this point in the history
  • Loading branch information
Son Nguyen committed Nov 29, 2023
1 parent c2b7ec9 commit efdc857
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/The-MovieVerse-Database.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ <h1 id="my-heading">
</h1>

<!-- Create a button to go back to the home page -->
<button class="back-btn" onclick="window.location.href='index.html'">Home</button>
<button class="back-btn" onclick="window.location.href='index.html'" title="Go back to homepage">Home</button>

<!-- Create a button to go to the About page -->
<button class="about" onclick="window.location.href='about.html'">About</button>
<button class="about" onclick="window.location.href='about.html'" title="About this wonderful app!">About</button>

<!-- Create a search form with an input and a button -->
<form id="form">
Expand Down
3 changes: 2 additions & 1 deletion movie-details.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1 id="my-heading">
<!-- Left side for Title and Image -->
<div class="movie-left">
<h2 id="movie-title" class="movie-header"></h2>
<img id="movie-image" alt="Movie Image" style="width: 25vw; height: 75vh"/>
<img id="movie-image" alt="Movie Image" style="width: 25vw"/>
</div>

<!-- Right side for Description and Rating -->
Expand All @@ -38,4 +38,5 @@ <h2 id="movie-rating" class="movie-rating"></h2>

<script src="movie-details.js"></script>
</body>

</html>
8 changes: 7 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ h2:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

@media (max-width: 768px) {
.movie-image {
height: 100%;
}
}

.movie-header {
text-align: center; /* Center the title */
align-self: center;
Expand Down Expand Up @@ -376,5 +382,5 @@ p {
background-size: cover;
background-position: center;
background-repeat: no-repeat;
overflow: hidden; /* Prevent scrolling on the entire body */
/*overflow: hidden; !* Prevent scrolling on the entire body *!*/
}

0 comments on commit efdc857

Please sign in to comment.