F
F
fastovvlad2018-02-15 21:12:04
css
fastovvlad, 2018-02-15 21:12:04

Why doesn't margin-top work?

I'm trying to indent
photos from all sides in 5px but for some reason margin-top is ignored. How to decide?
5a85cd3e5d939869810101.png5a85cd461b2d4437838701.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
F
Froggyweb, 2018-02-15
@fastovvlad

Because img is an inline element. And grids, yes. cool.....

A
aloky, 2018-02-15
@aloky

Maybe padding? As I understand it, you want to indent the picture, not the block?
#grid div { padding: 5px }

A
ALEXOR1302, 2018-02-15
@ALEXOR1302

I margin-topdon't see it in the code at all..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question