html5 columns,html - HTML5, CSS3 columns - Stack Overflow

Hay all im building a news aggregator with SimplePie, the SP elements are working fine but I would like to have the feeds that it pulls in displayed in columns across the page using HTML5 and CSS3. I have managed to implement it so that the columns are formed and display the feeds, but at the moment the stories are being ordered one on to of the other from left to right with the newest being displayed top left, the second newest bellow the first in column one and so on. What I would like is for the stories to be displayed from left to right across the column so that the newest is at the top of the first column, the second newest at the top of the second column, the third newest in the third column and so on.

The code that Im using at the moment is as follows:

<?php if ($feed->error): ?>

<?php echo $feed->error; ?>

<?php foreach ($feed->get_items() as $item): ?>

<?php echo $item->get_title(); ?>

Source: <?php $feed = $item->get_feed(); echo $feed->get_title(); ?> | <?php echo $item->get_date('j M Y | g:i a T'); ?>

And this CSS:

#page-wrap {

width: 100%;

margin: 25px auto;

height:400px;

text-align: justify;

-moz-column-count: 3;

-moz-column-gap: 1.5em;

-moz-column-rule: 1px solid #c4c8cc;

-webkit-column-count: 3;

-webkit-column-gap: 1.5em;

-webkit-column-rule: 1px solid #c4c8cc;

}

If anyone could help me out with this that would be great.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值