Forums

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

Home Forums JavaScript Struggling with a simple Last-Child

  • This topic is empty.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #34609
    sly
    Participant

    Hi

    I have a wordpress site: http://hwbidco.co.uk and in my div:right-column I have given the div with the class: ‘read-more’ a bottom border.

    I am trying to target the last ‘read-more’ div to have a bottom border of none. But I’m failing to target it. Can anyone tell me how to select it to turn off the bottom-border?

    Thanks,

    Simon.

    #88360
    chrisburton
    Participant
    .read-more:last-child { border: none; }
    #88361
    sly
    Participant

    Hi, I thought that might be the answer, but it isn’t making a difference in my site. I don’t understand why.

    #88363
    sly
    Participant

    long winded, but it works, thanks!!!

    #88364
    sly
    Participant

    sigh, now struggling with putting space between the blog entries on http://hwbidco.co.uk/blog

    WP doesn’t seem to assign a class to the blog titles so I don’t know how to target them to put more space in

    Can anyone help?

    As you may guess, I’m new to WP and css!

    Thanks!

    #88365
    chrisburton
    Participant

    depending on what page you’re on they’re either an H2 or an H1. On the link you provided, they are an H2.

    #88366
    sly
    Participant

    Thank you very much Christopher.

    I am now trying to find a way to target the H2s on the blog posts and not on the normal ‘Pages’ in WordPress.

    #88367
    chrisburton
    Participant

    For a single post page

    .single h1 { }

    The blog index page

    .blog h2 { }
    #88369
    sly
    Participant

    amazing, thanks for your help guys. I can see that this works because WordPress dynamically gives the pages a class, in my case: blog.

    This post is most definitely solved, thanks so much for your time. I am learning, thanks to you.

    Sly.

Viewing 9 posts - 1 through 9 (of 9 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.