WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Centering Button Script in Posts

[Resolved] Centering Button Script in Posts

  • I would like to use the Readability Free Embed Buttons at the beginning of each post just below the title of the post, but I am having trouble centering it. Here is the code:

    <div class="rdbWrapper" data-show-read-now="1" data-show-read-later="1" data-show-send-to-kindle="1" data-show-print="1" data-show-email="1" data-orientation="0" data-version="1" data-text-color="#555555"></div><script type="text/javascript">(function() {var s = document.getElementsByTagName("script")[0],rdb = document.createElement("script"); rdb.type = "text/javascript"; rdb.async = true; rdb.src = document.location.protocol + "//www.readability.com/embed.js"; s.parentNode.insertBefore(rdb, s); })();</script>

    And you can see it in this post on my site:

    Dappled Things – Letters to My Daughters

    I would be very grateful if someone could help me with this. Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’ve seen several posts about centering things, but none of the suggestions are working for me. Is there anyone out there willing to take a look for me?
    🙁

    WPyogi

    @wpyogi

    Forum Moderator

    Do you have a child theme or custom CSS set up? If you make changes to the theme files, they will be lost when the theme is updated…

    I’m not worried about the theme being updated. I’m not sure about it being a child theme. I do know that my theme, Melville, is based on TwentyTen. Can you give me any advise about centering these buttons? If I change my theme or if an update comes out for my theme, I will still know how to fix the problem in the future. I want to figure it out now.

    WPyogi

    @wpyogi

    Forum Moderator

    That’s really not the way to go, and just so you know, generally these forums only support themes from here: http://wordpress.org/extend/themes/ .

    That said, I already looked at your site – it looks like you do have a custom CSS section — this CSS should work there:

    div#readabilityEmbedContainer iframe {
       width: 400px !important;
       display: block !important;
       margin: 0 auto !important;
    }

    Thank you! I had to change the width to 360px to get it to center, but it seems to be working from my end. Could you take a look at it and tell me how it looks to you? Thanks again! 🙂

    WPyogi

    @wpyogi

    Forum Moderator

    Looks good to me too — glad it worked. Your site is really nice too – lovely story :). Family stories are so invaluable to tell and save — my mom (she’s 76) has been writing her “life stories” for some years and I cherish every word of them.

    Thank you. What a beautiful gift your mother is giving! My mother would have been 74 next month. I wish I had something like that from her. 🙂

    Thank you again, for your help. If it makes you feel better I am thinking about changing my theme to one of three minimalist themes that are supported by WordPress. I just really fell in love with Melville.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Centering Button Script in Posts’ is closed to new replies.
Skip to toolbar