Skip to content

Instantly share code, notes, and snippets.

@grantambrose
Created August 12, 2016 16:32
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save grantambrose/d1bff123dd494e3049afe55dc3e51263 to your computer and use it in GitHub Desktop.
Save grantambrose/d1bff123dd494e3049afe55dc3e51263 to your computer and use it in GitHub Desktop.
Create a two column WooCommerce Checkout Page to streamline purchasing
/* Large devices (large desktops, 1200px and up) */
@media (min-width: 993px) {
/* ---------------------
WOOCOMMERCE
--------------------- */
body .woocommerce .col2-set .col-1{width:100%;}
.woocommerce-billing-fields h3{margin-top:40px;}
.woocommerce .col2-set, .woocommerce-page .col2-set{width:48%;float:left;}
#order_review_heading, .woocommerce #order_review, .woocommerce-page #order_review{float:left;width:48%;margin-left:2%;}
}
@Edwynn
Copy link

Edwynn commented Nov 29, 2018

I add this code:
margin-top: 3%;

To have both boxes at the same level

Thank u for share!

@vincenzoquarta
Copy link

Hi Grant,
I tried your CSS and it works fine but now shipping informations are half then upper column.
Please see the screenshot attached
Schermata 2020-04-12 alle 20 57 23

Can you help me?
Thanks

@Nmohd
Copy link

Nmohd commented Apr 30, 2020

The code is not working. I have added the code in theme style.css

@danielsami
Copy link

Hi Grant, almost 5 years later I found this page, awesome, still works even after many WooCommerce updates! Thanks a lot for sharing!

@grantambrose
Copy link
Author

grantambrose commented Aug 20, 2020 via email

@Cheizr
Copy link

Cheizr commented Dec 24, 2020

Worked! I don't know why all the checkout information displays in one-column... this fixed it.

@rodlopesoficial
Copy link

all right fellas, if additional information field is showing short, centralized like the screenshot above from @vincenzoquarta , just add this code and play with the numbers until you get it aligned.

.woocommerce-additional-fields {
left: -272.578px;
position: relative;
top: 0.5px;
width: 530px;
}

@lionel1702
Copy link

lionel1702 commented Aug 26, 2021

Taking reference from here and also other articles, here is my version

#place_order {
	width:100%
}

.woocommerce-form-login label.woocommerce-form__label.woocommerce-form__label-for-checkbox.woocommerce-form-login__rememberme {
   margin-top: 12px;
}

@media (min-width: 768px){
    #customer_details{
        width: 60%;
        float: left;
    }
    #order_review_heading{
        width: 30%;
        float: left;
		margin-left:2%;
    }
    #order_review{
        width: 38%;
        float: left;
		margin-left:2%;
    }
    .woocommerce table.shop_table td{
        width: 50%;
    }
    .woocommerce .col2-set .col-1, .woocommerce-page .col2-set .col-1,
    .woocommerce .col2-set .col-2, .woocommerce-page .col2-set .col-2{
        width: 100%;
    }
}

@ZJ-7
Copy link

ZJ-7 commented Sep 2, 2021

In addition to the original, I added the below code and looks perfect to me
.woocommerce-page .cart-collaterals .cart_totals{ width:100%; }

@coccoinomane
Copy link

Thanks @lionel1702! Your version works flawlessly on WordPress 5.6.0 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment