How can I make my image smaller and smaller?


Nadav Himmelfarb

When my browser size is less than 950px, my main image stops getting smaller and starts hiding behind the browser window. I tried changing the width, but then I started seeing my background color. Why is this happening and how can I fix it?

Here is my Codepen and part of my code:

#image {
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
margin: auto;
border-bottom: 1px solid #ed1c24;
object-fit: cover;

}

By the way, I don't know if it's customary here (if not, just tell me) to ask two questions in one post, I don't know why my media stops responding, when I hit 830px, nothing changes. It works like it did two minutes ago.

thank you all

company

Set on #image:

height: auto;

And you're missing parentheses on the first media query (line 189), which is why the other media don't work.

Also, when the position is set to relative, up, down, left and right do not work.

Edit: I played with some other elements in your Codepen. This should be closer to what you want: https://codepen.io/anon/pen/OZEOdW?editors=1100 At least you can compare it with your version, it might help :)

Related


How can I make my image smaller and smaller?

Nadav Himmelfarb When my browser size is less than 950px, my main image stops getting smaller and starts hiding behind the browser window. I tried changing the width, but then I started seeing my background color. Why is this happening and how can I fix it? He

How can I make my image smaller and smaller?

Nadav Himmelfarb When my browser size is less than 950px, my main image stops getting smaller and starts hiding behind the browser window. I tried changing the width, but then I started seeing my background color. Why is this happening and how can I fix it? He

How can I make my executable smaller?

spsm I use Visual Studio 2019 and one thing I noticed is that my output file is very large. I'm using publish, with optimizations set up to support small code. I also disabled generating manifest files and debug info. However, even after these changes, the exe

How can I make my custom ToggleButton smaller?

WPFFF So I made a custom toggle button with animation in Blend. But when I place this button and try to make it smaller, it goes like this: To this: How can I prevent this? I'm very new to this Blend Stuff, but how can I make it smaller and look like picture 1

How can I make this css star smaller?

username My code below : https://css-tricks.com/examples/ShapesOfCSS/ I want to shrink the stars. I tried changing the height and width, but nothing happened, what should I do? I made this http://jsfiddle.net/YXe3k/ .star-five { margin: 50px 0; position:

How can I make this css star smaller?

username My code below : https://css-tricks.com/examples/ShapesOfCSS/ I want to shrink the stars. I tried changing the height and width, but nothing happens, how would I achieve this? I made this http://jsfiddle.net/YXe3k/ .star-five { margin: 50px 0; po

How can I make the username in the terminal smaller?

Romeo When you open the terminal, it will display the username and machine name. As shown in my example: romeo@romeo-Satellite-C660D:~$. It's really annoying because it's huge. Can I make it smaller, e.g. only show Romeo? I know this sounds stupid, but I'm new

How can I make this css star smaller?

username My code below : https://css-tricks.com/examples/ShapesOfCSS/ I want to shrink the stars. I tried changing the height and width, but nothing happens, how would I achieve this? I made this http://jsfiddle.net/YXe3k/ .star-five { margin: 50px 0; po

How can I make the username in the terminal smaller?

Romeo When you open the terminal, it will display the username and machine name. As shown in my example: romeo@romeo-Satellite-C660D:~$. It's really annoying because it's huge. Can I make it smaller, e.g. only show Romeo? I know this sounds stupid, but I'm new

How to make an image on a bitmap smaller?

fast I'm trying to build a simple game on android, and when I set a background image and other image assets on my home screen, it looks too big as shown in the image below. The actual size of the image is 1920x1080 and I want it to fit my screen like in the im

How can I add a media query to make the image's padding smaller?

Priscilla Monek I'm working on a small gallery and I just figured out how to use Salvatore (similar to Masonry). The problem I'm having is that when I zoom out the page, the padding is still 10px, I want it to be 5px so that all 3 columns are still visible and

How can I add a media query to make the image's padding smaller?

Priscilla Monek I'm working on a small gallery and I just figured out how to use Salvatore (similar to Masonry). The problem I'm having is that when I zoom out the page, the padding is still 10px, I want it to be 5px so that all 3 columns are still visible and

How can I make the content smaller to connect with the footer?

xPsyFreeStyle I have a large empty space between the site content and the footer , can someone help me get this space out and make the content connect the footer? Silvik you have several empty paragraphs and big margin bottom under .wonderplugincarousel-contai

How can I adjust a bar chart to make the bars smaller?

ocean I need help resizing column widths in a bar chart. I am using the following R script to get a bar chart with p-values, but the width of the bars (columns) is too wide. thanks library(ggpubr) library(rstatix) df <- ToothGrowth df$dose <- as.facto

How can I make this footer's padding smaller?

Anaya Dream The footer looks too large, taking up almost most of the screen, especially on smaller devices. How can I reduce the height of this footer so that it doesn't look too big for big and small screens. import { Container, Box, Grid } from "@material-ui

How can I create my own GUID algorithm with a smaller "global"?

5 Argon I have my own application whose "global" is much smaller than the actual global, and I want to use the short GUID version. Now suppose I have a specific number of IDs that I estimate will not exceed (say 100 million IDs). How can I determine the number

How can I create my own GUID algorithm with a smaller "global"?

5 Argon I have my own application whose "global" is much smaller than the actual global, and I want to use the short GUID version. Now suppose I have a specific number of IDs that I estimate will not exceed (say 100 million IDs). How can I determine the number