Hello, how to center the table by clicking the table drop-down?

I have a div and in this price sheet , did drop the price when you click, only here if to this table have to leave the display block then margin: 0 auto table is centered and if you leave the block invisible so that when clicked opened up the table is not centered
margin does not help.
April 7th 20 at 15:24
2 answers
April 7th 20 at 15:26
Solution
On the basis of the sandbox, a table wrapped in a wrapper, for example in div.wrapper. In CSS for .wrapper write
.wrapper {
 display: flex;
 justify-content: center;
}
have .table remove display: none and put it in .wrapper. Selector .price:hover ~ .table change .table on .wrapper
thank you. happened. - Lowell.Stoltenberg commented on April 7th 20 at 15:29
April 7th 20 at 15:28
CSS(Pre-wrap the table in a block .block):
.block {
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
}

Properties of googling, nothing complicated
thank you. it turned out - Lowell.Stoltenberg commented on April 7th 20 at 15:31
@vicente_Christiansen5, try first Google, then ask here a question is very easy guslitsa - demarcus.Langosh commented on April 7th 20 at 15:34

Find more questions by tags CSSHTMLJavaScript