SimplePortal
Support => English Support => Topic started by: fapencio on December 05, 2014, 05:42:11 PM
-
Hi friends, I need your help, I would like to split into 2 columns the "BOARD NEWS" block, like this:
(http://i59.servimg.com/u/f59/18/92/31/95/portal10.jpg)
(http://i59.servimg.com/u/f59/18/92/31/95/portal11.jpg)
thanks in advance
-
Sources/PortalBlocks.php
else
{
foreach ($return as $news)
{
echo '
<div class="sp_article_content">';
else
{
$count = count($return);
foreach ($return as $key => $news)
{
$last = $key == $count - 1;
$even = $key % 2 == 0;
if ($even)
echo '
<div style="overflow: auto;">';
echo '
<div style="float: ', $even ? 'left' : 'right', '; width: 49%;">';
echo '
<div class="sp_article_content">';
echo '
</div>';
}
}
if (!empty($per_page))
echo '
</div>';
echo '
</div>';
if (!$even || $last)
echo '
</div>';
}
}
if (!empty($per_page))
You may have to do some fine-tuning if your content size is too dynamic though.
-
Thanks Master Sinan, It worked perfectly, just the white line separating the two columns is a bit wide, no way to reduce it? please? check my portal forum
-
You just need to increase 49% to something bigger but less than 50% in the first change. (like 49.5%) Just try yourself and see what works out best for you.
-
awesome, thanks my friend, i change to 49.7%, this tutorial will serve many users, Greetings, TOPIC SOLVED
-
I hope it does. You're welcome. :)