F
F
freeman02042015-09-25 14:51:56
css
freeman0204, 2015-09-25 14:51:56

First-child and last-child not working, how to fix?

First-child and last-child not working, how to fix?

.wrapper-main img {
  margin-left: 11px;
}

.wrapper-main img:first-child {
  margin-left: 0;
}

Here is the codepen.io/anon/pen/VvKJqy and I still don’t understand why in a container where there are 10 pictures, the indentation from the bottom is slightly larger and even on top of the block with pictures there is a small gap, I don’t understand where it could come from? Here is the screenshot.ru/5753ebb171bff27736c4da1f7167412e

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Ksenia Mikhailova, 2015-09-25
@freeman0204

As for the pictures: the links there are inline blocks, and so that there is no indentation, they need to be given a zero font size prntscr.com/8ka8od
And for pictures: so each picture lies in its own a, so it is both the first and last descendant there .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question