html - Centering a div element -


i have container center not seem working. have set margins on right , left auto stuck on right hand side , getting frustrating.

.music .pane {     margin-top: 15%;     margin-right: auto;     margin-left: auto;     max-width: 70%;     display: inline-block;     font-size: 110%;     background: rgba(240,240,253,0.90);     padding: 22px 32px;     -moz-border-radius: 8px;     -webkit-border-radius: 8px;     border-radius: 8px;     -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);     -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);     -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); } 

you need leave div block element.

.music .pane {     margin-top: 15%;     margin-right: auto;     margin-left: auto;     max-width: 70%;     display: block;     font-size: 110%;     background: rgba(240,240,253,0.90);     padding: 22px 32px;     -moz-border-radius: 8px;     -webkit-border-radius: 8px;     border-radius: 8px;     -moz-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);     -webkit-box-shadow: 0 0 18px rgba(0, 0, 0, 0.9);     -box-shadow: 0 0 18px rgba(0, 0, 0, 0.9); } 

js fiddle


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -