A
A
Andrey Fedorov2017-01-08 12:53:04
css
Andrey Fedorov, 2017-01-08 12:53:04

Why is the svg in this code not 40px high, but 100?

Here is the code:
codepen.io/aliencash/pen/LxVopr?editors=1100#0
Of course, I can also force height: 40px for svg; but it's not clear why the svg is not constrained by the parent's forced height, why the viewbox is ignored, and in general WHAT'S HAPPENING?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Fedorov, 2017-01-08
@aliencash

Found the answer on stack - stackoverflow.com/questions/39260135/why-does-the-...

W
WQP, 2017-01-08
@WQP

You've got steel

.key-svg {
  width: 40px;
  height: 40px;
  padding: 0;
  box-sizing: border-box;
  border-radius: 1000px;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question