Small white bars running width of page

I am working on my portfolio and I have 4 sections. I denoted these using divs and in between each div there is a small white bar running horizontally through the page. I used images as background for each div. I was wondering if anyone has run into a similar issue. Thanks

Do you have a link to a pen? It’s hard to answer without seeing it. Alternatively, you can post all the code and maybe someone will have the time to set it up and try it out.

Without seeing the code, it sounds like a margin/padding issue. If you post the a CodePen link, people will be able to help you more thoroughly.

1 Like

Sorry, I meant to link it. Here it is:

My first guess was that they were coming from the divs, but that doesn’t seem to be the case. I seems that they are coming from the elements inside the divs.

When I apply this CSS:

h1, h3, p {
  margin: 0;

the first one goes away.

I’m not sure I understand, but that seems to work.

Yeah, the margins are coming from the empty <p>s that he’s using as targets.

@jbern5 you should remove them and give the ids to the containers’ div (the ones with the background(n) classes), it’ll work the same.


Great thank you so much. I did what you said and they went away