Grow your CSS skills. Land your dream job.

How do I add a class to the <p>

  • # October 16, 2009 at 7:24 pm

    I was wondering how i would add a class to the <p> element because when ever I use a template tag it makes it own <p> tags and wont use tags like <p class="footer-tags">. Any way i can add a class to something like <?php wp_tag_cloud(); ?>.
    Thanks
    Ben

    Rob
    # October 17, 2009 at 8:06 am

    well you could just wrap the cloud in something else? I dont really know what you are trying to do – other than add a class, I suspect so you can apply a style…

    So why dont you just do something like…

    .theclass p { style }

    that would effect the P’s inside the element with "theclass" class lol…

    <div class="theclass">
    <p></p>
    </div>

    Obviously it can be any block element, not just a div… :)

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".