Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

On my blog I'm trying to center the embedded audio posts. My blog is http://minimalfox.tumblr.com. I looked it up and I found out some people have tried centering iFrame. I've also tried (as you can see) margin: auto; inside .audioembed

Here's my block audio code:

.audioEmbed {
       margin-left: auto;
       margin-right: auto;
   }

{block:Audio}

                    {block:AudioEmbed}

                        <div class="audioEmbed">

                            {AudioEmbed-400}

                        </div>

                    {/block:AudioEmbed}

                {/block:Audio}
share|improve this question
add comment

1 Answer

In order to center a block-level element you need to give it a width. It will otherwise default to 100%.

.audioEmbed {
    width: 20em;
    margin-left: auto;
    margin-right: auto;
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.