Flex box help please!

I am working on my portfolio project and running into a problem I haven’t been able to solve through google searches.

My flex boxes do not extend to the full width of the viewport, along the top, left, and bottom–but they do to the right. I do not want that white border that is currently there, but am not sure which section of code needs attention. Thanks!

https://codepen.io/smallplatz/pen/BaWpwMN

Do you mean the default margin on the body element?

body {
  margin: 0;
}

@smallplatz As you learn more CSS you will find that there are default attributes to HTML elements that you will need to change like:

body { 
    margin: 0;
}
a {
    text-decoration: none;
}
ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}
img {
    display: block;
}

Some people start out a page removing all the margin and padding from every element like this:

* {
    margin: 0;
    padding: 0;
}

Thank you both! That was my trouble. And thank you for explaining it.

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