• Resolved amlove32

    (@amlove32)


    Hi guys, I hope I can explain what I’m trying to do well enough for you.

    I have my dates for my posts set up as (ex.) June 30 2008

    I want the “June” and “2008” to be formatted as it already is, however I want the “30” to be formatted differently.

    Here is the PHP in index.php for the date:

    <div class="postmetadata"><?php the_time('F j Y, h:i a'); ?> <!-- <?php _e('by') ?> <?php the_author() ?> --></div>

    Here is the CSS class for only the “30”

    /* big number for date */
    .bigdate{
    	font-size: 36px;
    	color: #CC0000;
    	text-decoration: none!important;
    }

    How do I integrate the .bigdate into just the ‘j’ and leave the rest of the date as-is?

    Granted, I will change the .bigdate attributes later.. I just put something there to try to figure out how to just apply it to the 30.. but everything I have tried doesn’t work. It seems I can read what’s going on but I can never figure out how to make something up myself.. Thanks in advance to whoever can point me in the right direction! I’ve been reading other posts here and you guys are awesome (but I’m sure you don’t need me to tell you that).

Viewing 3 replies - 1 through 3 (of 3 total)
  • <div class=”postmetadata”>
    <?php the_time(‘F ‘)?>
    <span class=”bigdate”><?php the_time(‘j’)?></span>
    <?php the_time(‘ Y, h:i a’); ?>
    </div>

    Thread Starter amlove32

    (@amlove32)

    Awesome xzeed! I knew it had to be something so simple but yet I was making it difficult as I tend to do. I never even thought about breaking up the F j Y like that. Thank you so much. :o)

    np 🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘CSS with PHP Date’ is closed to new replies.