Fixed image aspect ratio on phone

This commit is contained in:
Matic Ivešić 2025-10-29 14:33:20 +01:00
parent 284158bf14
commit a8768f7ac3
3 changed files with 17 additions and 16 deletions

View File

@ -18,25 +18,11 @@
z-index: 1; z-index: 1;
} }
.blur-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
background-color: rgba(15, 15, 16, 0.8);
}
div>img{ div>img{
padding: 1em; padding: 1em;
width: 15em; width: 15em;
z-index: 1; z-index: 1;
} }
@media (min-width: 900px){ @media (min-width: 900px){
:global(.header-contact){ :global(.header-contact){

View File

@ -12,6 +12,7 @@ import ZoomInImage from '$lib/ZoomInImage.svelte'
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center;
} }
.service-content{ .service-content{
@ -19,6 +20,7 @@ import ZoomInImage from '$lib/ZoomInImage.svelte'
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column-reverse; flex-direction: column-reverse;
align-items: center;
gap: 2em; gap: 2em;
} }
@ -36,10 +38,16 @@ import ZoomInImage from '$lib/ZoomInImage.svelte'
text-transform: uppercase; text-transform: uppercase;
} }
h2{
text-align: center;
width: 100%;
}
@media (min-width: 900px){ @media (min-width: 900px){
.service-content{ .service-content{
flex-direction: row; flex-direction: row;
align-items: start;
} }
.image-right{ .image-right{

View File

@ -11,9 +11,9 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
border-radius: 2em; border-radius: 2em;
width: 100%; width: 80%;
height: 0; height: 0;
padding-top: 35%; padding-top: 60%;
overflow: hidden; overflow: hidden;
z-index: 0; z-index: 0;
} }
@ -31,6 +31,13 @@
transform: scale(1.1); transform: scale(1.1);
} }
@media (min-width: 900px){
.image{
padding-top: 33%;
}
}
</style> </style>
<div class="image"> <div class="image">