I have written a loop in wordpress that loops through the post titles and then displays the first 6 in a special latest news section on top of the page. The problem is that i cannot bring the headings closer as you can see in image 1. I want these titles to appear as shown in image 2.
Here’s my HTML and PHP code:
<div id="freshlyWrapper">
<div id="freshlyposts">
<?php
$freshlyIonised = new WP_Query();
$freshlyIonised->query('category_name=featured&showposts=6');
while($freshlyIonised->have_posts()):
$freshlyIonised->the_post();
?>
<div class="freshlyionisedbox"><h3><?php the_title(); ?></h3></div>
<?php endwhile; ?>
And here’s the CSS:
#freshlyWrapper {
width: 980px;
text-align: left;
background: #ffffff;
float: left;
}
#freshlyposts {
width: 980px;
margin: 0 auto;
text-align: left;
height: 100px;
color: #000000;
}
.freshlyionisedbox {
position: relative;
float: left;
height: 25px;
margin-left: 140px;
padding: 0px;
top: 3px;
}
#freshlyposts h3 {
width: auto;
font-weight: normal;
letter-spacing: normal;
font-family: Georgia, "Times New Roman", Times, serif;
font-size: 13px;
}
.clearboth { clear: both; }


1 Answer