Forums

How to style posts? (5 posts)

  1. vieya
    Member
    Posted 7 months ago #

    How would I style the posts in the loop? For example if I wanted each post in my blog to have a gray box surrounded the post?

    Don't know if it's relevant but I'm using twenty eleven for theme.

    But even if that's the case how would you style it in general?

    Also would I be able to style everything in the post itself?

  2. peredur
    Member
    Posted 7 months ago #

    You would probably use Firebug to find out what the name of the block element in which the post content lived was, and then style that via CSS. There will probably be more than one candidate, but you can use Firebug to test the different choices out to see which one works best for you.

    Since you mention the twentyeleven theme, I should say that you really must make all your alterations to any default theme in a Child Theme.

    HTH

    PAE

  3. vieya
    Member
    Posted 7 months ago #

    Definitely, all my changes are a child theme. What would be nice if there was a specific way to find the loop area. I've tried that before but I guess I need to take another look maybe I'm missing something. Hopefully there is something that I missed. Thanks!

  4. Josh
    Member
    Posted 7 months ago #

    What's the URL.

    This should be able to be accomplished pretty easily using custom CSS.

  5. D Chad
    Member
    Posted 7 months ago #

    Hi,

    The loop can be within the php template file or an external loop.php file that is included. Look in single.php or related templates that end in loop or single .php. From there you should see the CSS class that is styling the post. As Josh noted we can find it by looking at the site too as the class will be printed in the markup via view source, fire bug etc.. You can style them all or even do unique templates for different categories.

    Hope that helps.

    Cheers,
    Chad

Reply

You must log in to post.

About this Topic