How to wrap the border around all the elements in the page?

Currently the border wraps from the left to the right of the page, how do I make it such that it only wraps around the form?

Welcome jyorin.

Your question seems bizarre to me, because if you had composed that HTML page, you would definitely know what to do.

The border is defined by this:

.container {
    border: 2px solid sienna;
    
}

The form has an id=survey-form

So, instead of putting the border around the container, put it around the form…

If not that, and you just want the border to be closer to the content:

.container {
  border: 2px solid sienna;
  margin: 0 20%;
}

Fiddle around with the values.

Am I understanding your question?

ah sorry for the weird phrasing. I meant I want the border closer to the content, thank you for your help.Will fiddle ard with the margin values. Sorry, I am still quite confused with which css property to use to get my intended outcome hence I got stuck :sweat_smile:

1 Like