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

Home Forums CSS help with borders

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #38349

    I have some tabs. I am trying to get a 1px border around the tabs. But where the tabs touch, they make a 2px border. I am trying to figure out how to fix that. I got part of the way there with first-child and last-child but it messed it up. It’s the left and right borders I am trying to get right, the left border needs to be one pixel, but not where it touches tab 2 or tab 3, but then the last tab needs to have a right border to end it. Can you take a look?


    Assign a class to the last tab to create the right border. Otherwise, left borders only.


    If you can’t add a class, then remove either left or right border and use the first-child or last-child pseudo-selectors (respectively). Not overly backwards compatible but you’re good for the part of the market that will notice/care.


    Use first-child as it has much better browser support.

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