WordPress.org

Ready to get started?Download WordPress

Forums

Adding css to a php generated item (2 posts)

  1. outtareach
    Member
    Posted 2 years ago #

    I have a few items that I added through the backend to my site. In css they are all just portfolio-item" with no specific id on each. How would I add css to each one separate and not to the entire batch? In the php it just calls 4 items without discretion. I want to take item 1 and add a padding to it. Can this be done in css?

  2. WPyogi
    Volunteer Moderator
    Posted 2 years ago #

    It depends on the code structure -- maybe using "child selectors" would work:

    http://www.w3schools.com/cssref/sel_firstchild.asp

    http://www.w3schools.com/cssref/sel_nth-child.asp

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags