B
B
BookerDeWitt2017-04-15 19:07:02
css
BookerDeWitt, 2017-04-15 19:07:02

Margin not working inside div block, collapse? How to fix?

There is the following code

<div id=statistics>
     <div id=stats>
        <div>42 <span>WEB DESIGN PROJECTS</span></div>
        <div>42 <span>WEB DESIGN PROJECTS</span></div>
        <div>42 <span>WEB DESIGN PROJECTS</span></div>
        <div>42 <span>WEB DESIGN PROJECTS</span></div>
     </div>
</div>

I want to center the contents of the #stats block in the center of the #statistics block using margin, but it doesn't work, why? And how to fix it?
The code is here https://jsfiddle.net/w6q8jujf/1/

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2017-04-15
@BookerDeWitt

Example

A
Alexey Strukov, 2017-04-15
@pm_wanderer

So?
https://jsfiddle.net/w6q8jujf/3/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question