Styling the Date (8 posts)

  1. Beniam
    Posted 12 years ago #

    I am working on styling the date for my posts. I want to either center them or align them on the right. I don't seem to se a way to target them sesifically though. Anyone know how to do this? I would also like to add some sort underlining that would set them off from the posts.
    Does anyone know if the index.php file changed a lot in this release candidate from the last one? I am trying to figure out how much more work to put into tweaking that before I get on board with 1.2.0

  2. Anonymous
    Posted 12 years ago #

    The index file changes very little. If there is any change, it should be easy to add, but what you got should still work.

  3. Beniam
    Posted 12 years ago #

    How about a funky underline for the dates. Anyone have any ideas?

  4. Anonymous
    Posted 12 years ago #

    What kind of funky underline? You can use the border-bottom property to make an underline. There are many different ways to style a border. A great place to start is the CSS2 Box model for border.

  5. Beniam
    Posted 12 years ago #

    I want it to run the span of the content, ie across the whole left column. I can style it but I don't know how to target the date spesifically.
    Thanks for your help.

  6. Anonymous
    Posted 12 years ago #

    Ah, yes. The tag it uses can be changed too. If you open your index.php and look for <?php the_date('','<h2>','</h2>'); ?>, you can change the <h2> tags to something you'd like to use instead.

  7. Beniam
    Posted 12 years ago #

    Can I give those tags ID's or class selectors within the php code?
    To be spesific, I really liked thenew underlines used on this site. I think they are pictures that get set below certin words. I was going to try to impliment something like that.
    I haven't gotten around to looking at the style sheet with that on it but I will soon.
    Thanks for the info.

  8. Joni
    Posted 12 years ago #

    I stripped the date tag of any hint of styling. Plus, I'm using a different date layout altogether. The date is actually the date and time: May 21, 2004 (11:04 a.m.).
    Here's what it looks like in the index.php template (I have no luck with posting code, even with backticks, so substitute left and right CARETS or CURLY BRACES for the brackets).
    [div class="storytitle"][?php the_title(); ?][/div]
    [div class="date"][?php the_time("m/d/Y (g:i a)") ?][/div]
    And here it is in the stylesheet:
    .date [
    background: #fff;
    color: #000;
    font-size: 12px;
    margin-bottom: 20px;
    If you wanted the date to be underlined, you might add something like this:
    border-bottom: 3px double #000;
    And of course change to a different color if you want. Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.