2

On my Tumblr blog I'm trying to center the embedded audio posts but they won't. I found some other people have tried centering iFrame. I've also tried setting margin: auto; in the CSS 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}

How can I get embedded audio posts to show centered on a post?

1

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;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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