Address alignment

Hi can you please point me to where to edit to fix the messy alignment of the shipping address as per screen shot - (to follow as there appears to be no way to add it here)

  • Patrick
    • Support Monkey

    Hi again Stephanie,

    Just created an account to test (username: pcwriter) that you can delete if you like.

    I see the default layout as in the screenshot attached (viewed in Firefox16 on a PC).

    The "messy alignment" is due to the contents being displayed dynamically in a table. It can be altered, but it will require adding a rather tricky entry to your style-sheet:

    table.mp_cart_shipping > tbody > tr:first-child > td:first-child {
    width:20%;
    }

    The above CSS would produce a layout like this screenshot.

  • Stefanie
    • The Incredible Code Injector

    Hi Patrick

    That looks much better.

    I will give it a try but must admit, I am not sure where to add this as I am not great with css.

    The theme is Simplemarket which has no child a default but I presume I can create a child theme and add it in there.

    I have vague recollections of a plugin called one click child theme which, if I remember correctly, creates a blank styles.css ready to edit - could I just copy into this doc with no other styles?

    Since it does look so much better after your expert changes I wonder if it should be added to Simplemarket in the next release?

    Thank you for the great support.

  • Patrick
    • Support Monkey

    You're right. I just checked SimpleMarket and there is no child-theme included. Darn it.

    To make a basic child-theme, all you need to start with is a style.css file with the appropriate header. To learn how to create one, see here:
    http://codex.wordpress.org/Child_Themes

    The style.css for your first child-theme would look like this:

    /*
    Theme Name:     SimpleMarket Child
    Description:    Child theme for the SimpleMarket  theme
    Author:         Stephanie
    Author URI:     http://your-site-url-here/
    Template:       simplemarket
    Version:        0.1.0
    */
    @import url("../simplemarket/style.css");
    
    table.mp_cart_shipping > tbody > tr:first-child > td:first-child {
    width:20%;
    }

    The most important parts are the template name (it must be exactly as the main parent theme folder), and the @import rule (it must request the style-sheet from the parent theme).

    Save that style.css file in a folder called Simplemarket-Child, upload it to your wp-content/themes folder. Then activate the child-theme, not the parent.

    Once that's done, you can customize the heck out of your child-theme, with zero worries of breaking it or losing your work when you update the parent.

    Hope this helps! And thanks for being a member :slight_smile:

  • Patrick
    • Support Monkey

    You only need to copy other templates from the parent to the child if you are going to be modifying them too. If they are identical, you don't need them in the child, 'cuz the child inherits everything it doesn't have from the parent.

    Aside from style.css, another file whose contents can add to or override the parent is functions.php. You'll need that file in your child if you want to add custom functions, or modify existing ones from the parent.
    http://codex.wordpress.org/Functions_File_Explained

    And you're very welcome! That's what we're here for :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.