Forums

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

Home Forums CSS Adding a button creates white space between div's Reply To: Adding a button creates white space between div's

#169246
aprobert
Participant

Thanks so much for the help. Yeah, I thought the “code dump” might not be the best way to show my code. I’ve just started learning and so I’ve been using Code Academy and Treehouse and on the Treehouse forums I think that’s how they want you to insert code. I’ll definitely use CodePen from now on.

I actually didn’t even know there was a button element. I just created a “button” with an a href inside a paragraph element and then added in padding. (That’s how they did it in an example on Treehouse). I assumed the top margin was the problem too so I have it set to 0 for p’s and a’s, but it didn’t work. When I moved the “button” inside a div within the container div then the white space went away.

Sorry, I know I’m not the best at explaining things. I’ll learn more and get better. Again, thanks for the help and patience.