Date on the same line than the post title
-
I know there have already been several topics about this but I am new to wordpress and CSS and I’m fighting for the last 2 days with CSS code to make this work.
I would like to have my date on the left (same line) that the post title.
Here is my function:<?php /* How to display all other posts. */ ?>
<?php else : ?>
<div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>><div class=”date”><div class=”day”><?php the_time(‘d’) ?></div>
<div class=”month”><?php the_time(‘M’) ?></div></div><span class=”post-title”>” title=”<?php printf( esc_attr__( ‘Permalink to %s’, ‘twentyten’ ), the_title_attribute( ‘echo=0’ ) ); ?>” rel=”bookmark”><?php the_title(); ?></span>
And here is my CSS:
.post-title {
color: #5B8580;
font-weight: bold;
font-size: 18px;
margin-left: 45px;
padding-left: 12px;
margin-left: 45px;}.post-title a:link,
.post-title a:visited {
color: #000;
text-decoration: none;
}
.post-title a:active,
.post-title a:hover {
color: #5B8580;
}.date { text-align: center;
width: 35px;
border-right: 2px solid #555;
line-height: 6px;
height: 20px
}.day {
font-weight: bold;
color: #555;
font-size: 17px;
}.month {
color: #555;
font-size: 10px;
text-transform: uppercase;
}I tried everything with changing float, margin, padding, etc… but can not get the title inlined with the date stamp.
https://www.djpromo.nl/wordpress
If someone would be kind enough to look at it and tell me what I’m doing wrong, I would be very grateful.
Thank you !
- The topic ‘Date on the same line than the post title’ is closed to new replies.