impove style

This commit is contained in:
starnakin 2024-08-05 22:15:47 +02:00
parent 9d297fca7f
commit 65a2adafab
2 changed files with 43 additions and 4 deletions

10
Book.py
View File

@ -9,9 +9,11 @@ class Book:
def to_html(self) -> str: def to_html(self) -> str:
return f""" return f"""
<tr> <tr>
<td class="name">{self.name}</td> <td class="image-div"><img src="img/{self.image}"></td>
<td class="description">{self.description}</td> <td class="namedesc-div">
<td class="image"><img src="img/{self.image}"></td> <p class="name">{self.name}</p>
<td class="review">{self.review}</td> <p class="description">{self.description}</p>
</td>
<td class="review-div">{self.review}</td>
</tr> </tr>
""" """

View File

@ -1,3 +1,40 @@
body{ body{
background-color: #586e75; background-color: #586e75;
}
h1, #table {
display: flex;
justify-content: center;
}
#table {
background-color: green;
}
tr {
max-height: 250px;
background-color: green;
}
img {
max-height: inherit;
max-width: inherit;
}
.image-div {
max-height: inherit;
width: 15%;
}
.namedesc-div {
width: 30%;
}
td {
background-color: red;
border: 2px solid;
}
.name {
font-weight: bold;
} }