Responsive gif image | Sololearn: Learn to code for FREE!
+ 1

Responsive gif image

How can I make a gif image responsive to all devices with css and html?

19th Feb 2024, 11:55 AM
Matthew Jenkins
11 ответов
0
LINK your code, if you want us to check on your code. Position and size are different things.
19th Feb 2024, 3:22 PM
Lisa
Lisa - avatar
+ 3
img { width: 90%; } instead of img { width: 500px; }
19th Feb 2024, 1:06 PM
Lisa
Lisa - avatar
+ 2
use relative units instead of absolute units.
19th Feb 2024, 12:40 PM
Lisa
Lisa - avatar
+ 1
Great that you found a way to fix it!
20th Feb 2024, 9:06 AM
Lisa
Lisa - avatar
0
Could you give me an example please Lisa
19th Feb 2024, 1:03 PM
Matthew Jenkins
0
I have done that already and yet the gif picture I have won't stay in the middle underneath the header when you open the website on a phone but on a pc the website is perfectly fine
19th Feb 2024, 3:18 PM
Matthew Jenkins
19th Feb 2024, 3:18 PM
Matthew Jenkins
0
Ok once I get home from work I will link my html code and css code Lisa
19th Feb 2024, 3:48 PM
Matthew Jenkins
0
Thank you Lisa
19th Feb 2024, 3:48 PM
Matthew Jenkins
0
I was able to fix it with this code Img { Width: 100%; Max-width: 300px; Display: block; Margin: 0 auto; } @media only screen and (max-width: 600px) { Img { Padding-left: 0; } }
20th Feb 2024, 8:15 AM
Matthew Jenkins
0
Thank you for you help Lisa
20th Feb 2024, 8:16 AM
Matthew Jenkins