CSS Image hide

i want to hide a party of image.how can i do it??
10 Replies
Jochem
Jochem•16mo ago
https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path or do you mean that you want the image to cover the entire available space, regardless of whether it's the correct aspect ratio? in that case, you'll want this one: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
BERSERK
BERSERK•16mo ago
for the object fit i need to use the background-image but i'm using the img tag
Jochem
Jochem•16mo ago
the link I sent you doesn't use background-images Take a look at the examples https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit#examples if it doesn't work, put your code in a codepen and I can take a look a it if you want
BERSERK
BERSERK•16mo ago
i try it but it doesn't work
Jochem
Jochem•16mo ago
tried object-fit, or tried making a codepen?
Unknown User
Unknown User•16mo ago
Message Not Public
Sign In & Join Server To View
Jochem
Jochem•16mo ago
It's definitely suggested in the how to ask good questions thread, but a lot of people don't bother. It's hard to enforce, because you can't always create one to demonstrate some issues I tend to make it a rule for myself that I don't put in more effort than the person asking the question did though. I'm not going to spend my time copying code off screenshots or making minimal reproductions for people if they can't be bothered to ctrl+c/v some code into a free website 🤷
BERSERK
BERSERK•16mo ago
sorry for being late
BERSERK
BERSERK•16mo ago
Want results from more Discord servers?
Add your server
More Posts
Color palette generationhttps://meodai.github.io/poline/Help with making only border corners visible! (Example inside)I'm doing this simple exercise and just noticed this little thingy they did with borders. I have no Can somebody help me understand these docs please?So I think I've discovered that my problems with a 3rd party captcha service - Turnstile - are down isolation in css: can't the gradient shadow be achieved just by z-index: -1?in kevin's video abt isolation https://www.youtube.com/watch?v=sNYVqfRwX1A&t=63s&ab_channel=KevinPowUsing :NOT operator deeply nested within duplicate elementsHi, I am working with a 3rd party library (DevExpress) which creates some complex controls. In thisWebsite which stores filter criteria between tab reloads, but not between tabs.Hi, So noticed that one of the websites which I am using stores criteria search somewhere. It is perPrint CSS only showing the first pageHello, I am trying to write some SCSS for printing the screen in A4 landscape that retains a lot of div h-full takes parent height even if there is a sibling in the same div TailwindCSS**Problem:** My div containing my text content overflows its parent whit full height **Desired**: ThBuild failed due to import errorBuild failed due to import error After running the build command for my react app the build failed Trying to align the "Check it out" links to the bottom of each card by defaultHaven't touched CSS in a few months so I'm super rusty, but decided to work on my portfolio a little