0
Responsive
How to set image without it stretching whole html i only 375px part of that image but it creates this scroll bar
7 odpowiedzi
+ 1
Is it satifying you ?
https://www.sololearn.com/en/compiler-playground/Wm5N1NLZOs0d
I guess It's : )
0
Take a look at this.......
https://www.w3schools.com/howto/howto_css_hide_scrollbars.asp
0
Hey there
Could you provide the link to your code?
0
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700&display=swap');
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'IBM Plex Sans', sans-serif;
overflow: hidden;
width: 375px;
position: relative;
}
html {
font-size: 10px;
}
.image {
position: absolute;
clip: rect(0px, 375px, 700px, 0px);
display: block;
}
0
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title>Document</title>
</head>
<body>
<img class="image" src="./assets/bg-main-mobile.png" alt="Your Image">
</body>
</html>
0
I only want 375px part of that image to be visible without it stretching whole space and creating scroll bar
0
I canr open it