Using this code you can show the post in Horizontal sequence :
function post() {
$args = array(
'showposts' => $num,
'numberposts' => 5
);
$results = get_posts($args);
if ($results) {
$counter = 0;
echo '<ul>';
foreach ($results as $result) {
echo '<li class="item">';
echo '<h3><a href="'.get_permalink($result->ID) . '">'.$result->post_title.'</a></h3>';
echo '</li>';
}
echo '</ul>';
}
}