Li borders not reaching side of page

I had it and now I don’t. I had already saved, so no ctrl+z for me. Here’s my codepen: https://codepen.io/Adham380/pen/dyWappw
Here’s my CSS:

* {
  box-sizing: border-box;
}
head {
  text-align: center;
}
body {
  display: table;
  margin-left: 0;
  margin-right: 0;
  background-color: #f1f1f1;
  font-family: Arial;
  text-align: center;
  margin: 0px;
  margin-top: 0px;
 
}

/* Center website */
.main {
  max-width: 1000px;
  margin: auto;
}

h1 {
  font-size: 50px;
  word-break: break-all;
}

.row {
  margin: 8px -16px;
}

/* Add padding BETWEEN each column (if you want) */
.row,
.row > .column {
  padding: 8px;
}

/* Create four equal columns that floats next to each other */
.column {
  float: left;
  width: 25%;
}

/* Clear floats after rows */
.row:after {
  content: "";
  display: table;
  clear: both;
}

/* Content */
.content {
  background-color: white;
  padding: 10px;
}

/* Responsive layout - makes a two column-layout instead of four columns */
@media screen and (max-width: 900px) {
  .column {
    width: 50%;
  }
}

/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 600px) {
  .column {
    width: 100%;
  }
}

#navbar {
  position: sticky;
  top: 0;
  margin-left: auto;
  margin-right: auto;
  padding-bottom: 1%;
  background-color: hsla(120, 100%, 25%, 0.5); /* dark green */
  list-style-type: none;
  width: 100%;
  padding-top: 1%;
  text-align: center;
}
ul {
  list-style-type: none;
    text-align: center;
}
li {
  margin-right: auto;
  margin-left: auto;
  border: 2px solid black;
  border-bottom: 1px;
  font-size: 110%;
  margin: -5;
  margin-top: -1px;
  padding: 1%;
      text-align: center;
}
li:first-child{
  border-bottom: 1px;
    text-align: center;
}

Hi
There’s a bottom slide bar on your web page .

.row {
  margin: 8px -16px;
  
}

This class might be causing the problem, try removing it.

suggestion: Try using flexbox or grid.

yeah, I ended up using a different approach so I never really realized, but now I know and yeah, I’ll use flexbox in the future.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.