wodosharlatan
wodosharlatan

Reputation: 73

Unable to set Width property on Form

It seems i cant set the width property of my Email input form (Via picture). For some reason width:100%; on the parent or child element does not work as intended. I need the form input to be as wide as all the other elements on my personal page

Here you can see the code: https://codepen.io/wodosharlatan/pen/ExpbVwg?editors=1100

Any help is appreciated and thanks for your time

enter image description here

Upvotes: 0

Views: 37

Answers (1)

TimonNetherlands
TimonNetherlands

Reputation: 1053

It's due to your display: grid; setting on the parent. This means the form will have the same width as the widest element in its column. In this case the contact__information div.

The solution is to add the following to your css:

.contact__form {
   grid-column:  span 2;
}

This will stretch your form over the width of the two columns.

Upvotes: 1

Related Questions