The MU forums have moved to

Code/CSS problems (8 posts)

  1. carnold
    Posted 15 years ago #

    Hey gang! I have a few problems with code, i believe, that i can not seem to get working. Link:, you will see, under the title that i have a date of the post. The problem comes in with not being able to line the post text up just beside the date. Here is the code i am using

    <?php if (have_posts()) : ?>
    		<h2 class="news">Latest News and Posts</h2>
    		<div class="post">
    		<?php if (is_home()) {?>
    		<?php } ?>
    		<?php while (have_posts()) : the_post(); ?><strong>Rate This Article</strong><?php if(function_exists('the_ratings')) { the_ratings(); } ?>	
    				<div class="date"><div class="month"><?php the_date('F'); ?></div><div class="day"><?php the_time('j') ?></div></div><p class="postmetadata">Posted in <?php the_category(', ') ?>  <?php edit_post_link('|','Edit', '', ' | '); ?></p>
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    I have tried to move the_content around and the div's around but can not seem to get the post text to line-up beside the date calendar. Here is the css code:

    	color: #464646;
    margin-bottom: 0.5em;
    margin-top: 0em;
    text-align: center;
    font-size: 1em;
    font-variant: small-caps;
    background-color: #fafafa;}
    h3, h4 {
    	font: 1.4em Georgia, "Times New Roman", serif; letter-spacing: 0.8px;
    	color: #434343;
    	padding: 20px 5px 0px 25px;
    	border-bottom: 1px #f2f7e3 solid;
    	background: url(images/postbg.png) no-repeat top left;}
    .post .date {
     width: 50px;
     height: 74px;
     background: #ffffff url(images/date.gif) no-repeat scroll center top;
     float: left;
     margin: 0 10px 10px 0;
    .date .month {
     font-size: 8px;
     text-align: center;
     height: 14px; line-height: 16px;
     text-transform: uppercase;
     font-weight: normal;
     color: #ffffff;
    .date .day {
     text-align: center;
     font-size: 25px;
     line-height: 20px;
     padding-top: 8px;
     font-weight: bold;

    I am also having big problems getting the comments link to actually return to the comments link. Here is that code:
    <div class="comments" onclick="window.location='"><div class="number"><a href="" title="Comment on Post: "><?php comments_number('0'); ?></a></div></div>
    and the corresponding css:

    .comments .number {
     float: right;
     width: 27px;
     text-align: center;
     font-size: 9px;
     line-height: 23px;
     color: #ffffff;
    .comments .number a {
     font-weight: bold;
     color: #ffffff;

    I would greatly appreciate any help!

  2. andrea_r
    Posted 15 years ago #

    Change these to the following:

    .entry {
    padding:30px 10px 0 0;
    } h2 {

    Note what I removed there.

    Also! Use Firefox and get the Firebug extension. Took me maybe 5 mintues to nail that down. :)

  3. carnold
    Posted 15 years ago #

    Cool! Thanks! I use only firefox and the web developer add-on but could not figure this out. So i installed the firebug add-on and will see what i can do with that. Happy new year to you and your family!
    Any ideas on the comments not working?

  4. andrea_r
    Posted 15 years ago #

    I missed the comments bit the first time aroudn, btu I'm betting it's this:


    No location specified, and the quotes are off.

  5. xenon2050
    Posted 15 years ago #

    I second andrea's suggestion. Get Firebug for Firefox!!!!! Believe me it will save you hours upon hours of time and will in generally just make your life easier!

    Link to Firebug:

  6. cafespain
    Posted 15 years ago #

    [fanboy mode] - Get a Mac and buy CSSedit - [/fanboy mode]

  7. andrea_r
    Posted 15 years ago #

    I have Linux, way cheaper. :D

  8. carnold
    Posted 15 years ago #

    I would like to revisit the comments problem i am having and please forgive me that i am a novice. Andrea_r replied above that onclick="window.location='" (No location specified, and the quotes are off) is the problem and i agree but i do not know what is suppose to go there. I have put and tried the comments_link but i can not get it to work with either.

About this Topic