Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS how to target

    in body div only

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #45130
    syrinx32123
    Participant

    Hello everyone,

    In a post on my blog, I have unorganized list in the body of the article and also in the sidebar. I’m trying adding a

    {padding-left: 25px; }

    to the bullets in the article ONLY, and not to the bullets in the right sidebar.

    This is probably a fairly simple CSS rule, but I’m not sure how to do it.

    I added

     body ul {padding-left: 25px;}

    but that also added padding to the sidebar lists. Any ideas?

    thanks,
    Evan

    page in question: http://www.travelgrom.com/travel-blog/balian-beach-bali-surf

    list in question: http://cl.ly/image/1h0D1O2M0Z2x

    #137496
    TheDoc
    Member

    For starters, you should be wrapping each article in a container, preferably `

    `. Then in your CSS you can very easily target only things inside the article by going:

    article ul {
    /* your styles here */
    }

    #137541
    syrinx32123
    Participant

    @TheDoc,

    Thank you. Do you know how I can get to WordPress automatically wrap my articles in

    ?

    #137546
    TheDoc
    Member

    You’ll just need to edit your theme’s code. Are you comfortable making changes like that?

    #137683
    syrinx32123
    Participant

    Yes, I’ve edited a lot of my themes PHP files, but mostly from reading step-by-step tutorials. Any chance you could point me to an article that explains how to add

     to every page?

    Thanks,
    Evan
Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘CSS’ is closed to new topics and replies.