Div in my form

Hi, Can you help me please on this form, i created an id saveform because i want to put background on the div of my submit button,but the problem is i want this div will occupy the whole width of my form. is this possible ?

Thank you in advance.


 .container{
   width: 542px;
}


 form{
  width: 400px;
}


 form div{
   float: left;
   margin-left: 50px;
   padding: 0 0 0.75em;
   width: 400px;
}

#saveform{
    margin:0;
   background-color: #000;
}


<div class="container">
  <form>
      <div>
          <label>name</label>
         <input type="text">
      </div>
      <div>
          <label>last</label>
         <input type="text">
      </div>
     <div>
          <label>age</label>
         <input type="text">
      </div>

    <div id="saveform"><input type="submit" value="submit"/></div>
 </form>

<div>



Applying width: 100% will cause the element to fill the entire width of its parent (less any padding).
Can you provide a little more detail about how it is currently acting incorrectly? A screenshot?

Hi ParkinT, Thank you for the reply…my mistake i use the wrong selector,…it’s now fix :slight_smile: