1

I have five li text elements inside a flex container with these properties

.contentwrapper{
  position: relative;
  width: 100%;
  padding-left: calc(((((100vw - (13rem))/ 12) * 2) + (1rem * 1)) + 1.5rem);
  padding-right: calc(((((100vw - (13rem))/ 12) * 2) + (1rem * 1)) + 1.5rem - .1px);
  margin: 0 auto;
  height: 100%;
}

ul.nav{
  position: relative;
  padding-top: 100px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: space-between;
  list-style: none;
}

li.navitem{
  position: relative;
  display: inline-block;
  cursor: default;
  font-size: 1.2em;
  text-transform: uppercase;
}
<div class="contentwrapper">
      <ul class="nav">
        <li class="navitem active">Online</li>
        <li class="navitem">In person</li>
        <li class="navitem">By phone</li>
        <li class="navitem">Mobile App</li>
        <li class="navitem">Inmate</li>
      </ul>
 </div>

The issue is that the li elements don't go to the edges of the container for some reason, even though there are no paddings or margins. What am I doing wrong and how can this be achieved using Flexbox(or not).? Help is much appreciated.

Example

Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
rukasu
  • 25
  • 4
  • Please provide an example other than an image – Axnyff Feb 12 '18 at 09:24
  • looks like `
  • ` elements with specified width and text center. show at least the CSS rules for the `
  • ` elements. You can also provide a snippet here so we can see the problem without image.
  • – Sebastian Brosch Feb 12 '18 at 09:27
  • looks like you have applied `flex:1` to the `
  • `
  • – Bhuwan Feb 12 '18 at 09:28
  • Here's a jsfiddle - https://jsfiddle.net/5cef0sm9/ – rukasu Feb 12 '18 at 09:43
  • Possible duplicate of [Does UL have default margin or padding](https://stackoverflow.com/questions/30424248/does-ul-have-default-margin-or-padding) – rishat Feb 12 '18 at 10:07