Everyone! So I've created a list of posts that's being

Hi Everyone!

So I've created a list of posts that's being displayed on a page with Title Thumbnail and a short bit of content followed by a download button.

I can't seem for the life of me to get the images to be aligned in the center of their parent div. There's something going on that's overriding whatever styles I apply and I'm not quite sure what's going on!

I would be very grateful for a little help! The page can be found at:

http://downloads.acoustagrip.com

Cheers!

Dakota

  • Tyler Postle

    Hey Daktoa,

    Hope you're doing well today and thanks for your question!

    try this CSS:

    .su-post {
    text-align: center;
    }
    
    .btn_outer {
    display: block !important;
    margin-left: auto;
    margin-right: auto;
    float: none !important;
    }

    Normally we wouldn't use the !important declaration but since you have those styles already declared as different values we will use it to make sure our new styles take higher priority :slight_smile:

    I'm pretty sure you already have a custom stylesheet if I remember correctly: however, just in-case - you can use this plugin if you don't: https://wordpress.org/plugins/simple-custom-css/

    Hope this helps Dakota!

    Let us know if you need any further assistance here.

    Cheers,
    Tyler

  • Dakota

    Hi Tyler!

    Thank you for your response! I had a feeling it was something so simple! The text-align did it for the image and the text just fine. I originally was trying to just center the image (which I still can't do for whatever reason) but after seeing just the centered image I probably would have preferred the look of everything centered anyway!

    This code worked fine:

    .su-post {
        text-align: center;
    }
    
    .btn_outer {
        margin-left: auto;
        margin-right: auto;
        float: none;
    }

    I use a plugin called CSS & Javascript Toolbox to insert CSS into my site. The documentation is a little light, so the learning curve was a bit rough, but now that I have the hang of it I love it! I'm going to write an article about how to use it for those that might want to check it out. I tried Simple Custom CSS for a while, but when I used pingdom to check my page load speed I noticed it was really causing problems (making the server wait, sometimes for up to 1 second!!!) I've found CSS & Javascript Toolbox to be a good solution now that I've got it working properly!

    CJT also has a wonderful mechanism for inserting jQuery into only the places you actually need it on your site. It has a pretty simple way of linking to the version of jQuery bundled with Wordpress, (along with any of the other scripts Wordpress comes bundled with!) so it really helps to not slow down the site! My favorite is that I can feel free to do whatever CSS I need on a page and I know that it's not going to be loading all over the site in places I don't need it!

    https://wordpress.org/plugins/css-javascript-toolbox/

    Cheers!

    Dakota

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.