DIVI: Specifying the number of columns for a DIVI blog

Contents

    The basic settings in a blog at DIVI do not allow the selection of columns. But you can change this with our CSS code 🙂

    You can use this code for 3 columns:

    .cu-blog .et_pb_salvattore_content[data-columns]::before {
    	content: '3 .column.size-1of4' !important;
    }
    @media only screen and ( min-width: 981px ) {
    	.cu-blog .column.size-1of4 {
    	    width: 32%!important;
    	    margin-right: 1%;
    	}
    }

    … this code for 4 columns:

    .cu-blog .et_pb_salvattore_content[data-columns]::before {
    	content: '4 .column.size-1of4' !important;
    }
    @media only screen and ( min-width: 981px ) {
    	.cu-blog .column.size-1of4 {
    	    width: 24%!important;
    	    margin-right: 1%;
    	}
    }

    … this code for 2 columns:

    .cu-blog .et_pb_salvattore_content[data-columns]::before {
    	content: '2 .column.size-1of4' !important;
    }
    @media only screen and ( min-width: 981px ) {
    	.cu-blog .column.size-1of4 {
    	    width: 49%!important;
    	    margin-right: 1%;
    	}
    }

    Dieser Beitrag ist auch verfügbar auf: Deutsch (German)

    Updated on 1. April 2024
    Was this article helpful?

    Leave a Reply

    Your email address will not be published. Required fields are marked *