I am creating a contact portion of my portfolio but for some reason the border I set for one div is overflowing into the next div. Here is what it looks like with the code
//CSS
.contact-cont {
padding: 4rem 12rem 0rem;
height: 90vh;
background-color: rgb(232, 234, 246);
}
.contact {
float: left;
padding: 1.5rem 4rem 1.5rem;
margin-right: 1rem;
border: 2px solid black;
}
.email {
color: black;
text-align: center;
border: 2px solid black;
}
.contact h1 {
padding-bottom: 2rem;
width: 50%;
}
//JSX
<div className='contact-cont '>
<div className='contact '>
<h1>
<strong>Let's chat</strong>
</h1>
<Form>
<Form.Row>
<Form.Group as={Col} controlId='formGridEmail'>
<Form.Label>Email</Form.Label>
<Form.Control placeholder='Enter email' />
</Form.Group>
<Form.Group as={Col} controlId='formGridPassword'>
<Form.Label>Subject</Form.Label>
<Form.Control placeholder='Subject' />
</Form.Group>
</Form.Row>
<Form.Group controlId='exampleForm.ControlTextarea1'>
<Form.Label>Comment</Form.Label>
<Form.Control as='textarea' rows='10' />
</Form.Group>
<Button variant='primary' type='submit'>
Submit
</Button>
</Form>
</div>
<div className='email'>
<h1>
<strong>Or you can email me directly at:</strong>
</h1>
<h2>jondoe@gmail.com</h2>
</div>
</div>
And here is what I want it to look like:
Why is the email div overflowing into my contact form?