<div class="grid-main">
<div class="grid">
<xf:widget key="online_list_online_statistics" />
</div>
<div class="grid">
<xf:widget key="forum_overview_forum_statistics" />
</div>
<div class="grid">
<xf:widget key="forum_overview_share_page" />
</div>
</div>
.grid-main {
display: flex;
}
.grid {
display: flex;
flex-direction: column;
flex: 1 1 250px;
}
.grid:first-of-type {
margin-right: 2%;
}
.grid:last-of-type {
margin-left: 2%;
}
.grid .block, .grid .block-container {
height: 100%;
}
@media (max-width: @xf-responsiveMedium)
{
.grid-main {
display: inherit;
}
.grid:first-of-type {
margin-right: inherit;
}
.grid:last-of-type {
margin-left: inherit;
}
}
.grid-main {
display: flex;
}
.grid {
display: flex;
flex-direction: column;
flex: 1 1 250px;
margin-left: 2%;
}
.grid:first-of-type {
margin-left: 0;
}
.grid .block, .grid .block-container {
height: 100%;
}
@media (max-width: @xf-responsiveMedium)
{
.grid-main {
display: inherit;
}
.grid {
margin-left: inherit;
}
}
I've updated the code. Please copy/paste again.
<span style="background-image: url("myimageurl/forum_bg.png");">
<center><b>my_content</b><br><br></span>
.grid [data-widget-key="forum_overview_forum_statistics"] .block-container {
background-image: url("myimageurl/forum_bg.png");
}
.grid [data-widget-key="service_forum"] .block-container {
background-image: url("https://www.forum-des-portables-asus.fr/forums/images/forum_bg.png");
}
<style type="text/css">
.block-minorHeader {display:none;}
</style>
<xf:if is="$xf.visitor.isMemberOf([3])">
<div class="grid-main">
<div class="grid">
<xf:widget key="service_forum" />
</div>
<div class="grid">
<xf:widget key="service_premium" />
</div>
<div class="grid">
<xf:widget key="service_detache" />
</div>
<div class="grid">
<xf:widget key="service_refurb" />
</div>
</div></xf:if>
<center>
<a href="/forums/forums/-/create-thread" class="button--cta button button--icon button--icon--write rippleButton" data-xf-click="overlay">
<span class="button-text">
Créer une discussion...</span>
</a>
</center>
.grid [data-widget-key="service_forum"] .block-container {
background-image: url("https://www.forum-des-portables-asus.fr/forums/images/forum_bg.png");
}
Ok, you can achieve this with a few manually steps.
1. Create an HTML widget, choose the position in my case Forum list: Above nodes and add this code to template field:
Code:<div class="grid-main"> <div class="grid"> <xf:widget key="online_list_online_statistics" /> </div> <div class="grid"> <xf:widget key="forum_overview_forum_statistics" /> </div> <div class="grid"> <xf:widget key="forum_overview_share_page" /> </div> </div>
Edit widget keys to suit your needs.
2. Copy/paste this code to EXTRA.less file:
Code:.grid-main { display: flex; } .grid { display: flex; flex-direction: column; flex: 1 1 250px; } .grid:first-of-type { margin-right: 2%; } .grid:last-of-type { margin-left: 2%; } .grid .block, .grid .block-container { height: 100%; } @media (max-width: @xf-responsiveMedium) { .grid-main { display: inherit; } .grid:first-of-type { margin-right: inherit; } .grid:last-of-type { margin-left: inherit; } }
This should be it.
Hi @JustwiseHi @BassMan .. can you pls re-edit this code for me for a two widget horizontally aligned instead of three?
and is it possible to both widget 2 different div class? instead of just 'grid'. If it possible, kindly give them 2 different div class.
Thanks.
<div class="grid">
<xf:widget key="forum_overview_share_page" />
</div>
<div class="grid">
for other two widgets add extra classes like<div class="grid class1">
and <div class="grid class2">
, for instance.We use essential cookies to make this site work, and optional cookies to enhance your experience.