Forums

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

Home Forums CSS Spacing On Each Side of List Separator

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #156407
    siouxfan45
    Participant

    http://codepen.io/anon/pen/tKrgD

    I have put together a list and I use a border as a spacer. How do I add equal space to this spacer on each side? Please note, I’d like to continue using a border property and not an actual spacer. I also need to keep the list flush on the left side as this is for a footer.

    #156408
    Paulie_D
    Member
    #156414
    wolfcry911
    Participant
    #156420
    Merri
    Participant

    Just to give some additional food for thought:

    ul,li {
      display: inline-block;
      vertical-align: top;
    }
    
    ul {
      font-size: 0;
      margin: 1px 0 0 1px;
      padding: 0;
    }
    
    li {
      background: #CCC;
      border: 1px solid black;
      font-size: 32px;
      font-size: 2rem;
      margin: -1px 0 0 -1px;
      padding: 0 1em;
    }
    

    http://codepen.io/Merri/pen/sAimL

    If you wonder why this is better than floats… resize the window.

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