XF 2.2 Two equal half column layout

asprin

Active member
Is there any specific XF tag (apart from <xf:datalist>) that can show content in two columns of equal width?

Or is this something that will need to be done via custom CSS?
 
Last edited:
Solution
You will probably need to generate some custom code and CSS to inject into your template. I used a Pages node which uses HTML and custom CSS on my Rock Reaction site to create three columns which house the three large images on the home page. If this is something you'd be interested in, then I can help with the HTML and CSS. The links to my sites are in my signature.
This might help you:

Or take a look at this CSS example and then apply it to the section/forum you want it to show in - you will need to identify which CSS elements need to have this applied to.

I did this a while back but can't remember what I did - it's an age thing lol. Hope the above gets you moving in the right direction.
 
This might help you:

Or take a look at this CSS example and then apply it to the section/forum you want it to show in - you will need to identify which CSS elements need to have this applied to.

I did this a while back but can't remember what I did - it's an age thing lol. Hope the above gets you moving in the right direction.
Thanks. I'm aware of this. But I'm trying to implement it in a custom template and not related to the forum view. So was wondering if there is something out of the box available.
 
You will probably need to generate some custom code and CSS to inject into your template. I used a Pages node which uses HTML and custom CSS on my Rock Reaction site to create three columns which house the three large images on the home page. If this is something you'd be interested in, then I can help with the HTML and CSS. The links to my sites are in my signature.
 
Solution
In any case, I went ahead with display:grid and grid-template-columns: repeat(2, 1fr); approach.
That's as good as any and I use it myself on all my sites to change the look of the layout, but do it with CSS affecting already installed elements like so:

Code:
    .structItemContainer-group{
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        padding: 10px;
        grid-gap: 10px;
        gap: 10px;
        
    }

    .structItem {
    flex-direction: column;
    border-width: 1px;
    display: flex;
    align-items: center;
    border-style: solid;
    border-color: #525151;
    border-radius:5px;
    justify-content: space-between;   
}
 
Top Bottom