There is a table in which an "Edit" button with a certain class is inserted in one of the "td", followed immediately by a "form" in which after several "input" buttons there is a "Delete" button with the same class as the " Edit". The problem is that these two buttons are displaced to each other, and I would like to shift them to the right edge and make indentation from each other. For a detailed description, I gave the code below.

html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, q, small, strong, sub, sup, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, input, table, caption, tbody, tfoot, thead, tr, th, td, figure { border: 0; margin: 0; padding: 0; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } table td { background: #fff; border: 1px solid #ccc; color: #454545; padding: 13px; } .b-info .gradient-button { float: right; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } .gradient-button, .wpcf7-submit, .form-submit #submit, button, input[type="button"], input[type="reset"], input[type="submit"] { font-size: 13px; line-height: 28px; font-weight: 700; color: #F74B60!important; height: 32px; padding: 0 5px !important; text-align: center; display: inline-block; background-color: #fff; border-radius: 6px; border: 2px solid #F74B60; } table { border-collapse: collapse; border-spacing: 0; width: 100%; margin: 0 0 30px; } a { color: #384250; font-weight: 600; text-decoration: none; -webkit-transition: all 0.1s ease-in 0.1s; -moz-transition: all 0.1s ease-in 0.1s; -o-transition: all 0.1s ease-in 0.1s; -ms-transition: all 0.1s ease-in 0.1s; transition: all 0.1s ease-in 0.1s; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } 
 <table> <tbody> <tr> <th>Vacancy Id:</th> <td> 32 <a href="https://sunnygeorgia.travel/create-vacancies/?fesid=32" class="gradient-button" title="Редактировать">Редактировать</a> <form method="post" name="delete_vacancy_32" id="delete_vacancy_32"> <input type="hidden" class="delete_vacancy_id" value="32"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="dec425659d"> <input type="hidden" name="_wp_http_referer" value="/my-vacancies/?accid=6035"> <a href="#" class="gradient-button button-delete button-delete-vacancy" title="Удалить">Удалить</a> </form> </td> </tr> <tr> <th>Тип номера:</th> <td>Улучшенный двухместный номер</td> </tr> <tr> <th>Свободные номера:</th> <td>10</td> </tr> <tr> <th>Дата начала:</th> <td>24.08.2016</td> </tr> <tr> <th>Дата окончания:</th> <td>31.08.2017</td> </tr> <tr> <th>Цена:</th> <td>$25.00</td> </tr> </tbody> </table> 

    3 answers 3

     html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, q, small, strong, sub, sup, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, input, table, caption, tbody, tfoot, thead, tr, th, td, figure { border: 0; margin: 0; padding: 0; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } table td { background: #fff; border: 1px solid #ccc; color: #454545; padding: 13px; } .b-info .gradient-button { float: right; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } .gradient-button, .wpcf7-submit, .form-submit #submit, button, input[type="button"], input[type="reset"], input[type="submit"] { font-size: 13px; line-height: 28px; font-weight: 700; color: #F74B60!important; height: 32px; padding: 0 5px !important; text-align: center; display: inline-block; background-color: #fff; border-radius: 6px; border: 2px solid #F74B60; } table { border-collapse: collapse; border-spacing: 0; width: 100%; margin: 0 0 30px; } a { color: #384250; font-weight: 600; text-decoration: none; -webkit-transition: all 0.1s ease-in 0.1s; -moz-transition: all 0.1s ease-in 0.1s; -o-transition: all 0.1s ease-in 0.1s; -ms-transition: all 0.1s ease-in 0.1s; transition: all 0.1s ease-in 0.1s; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } td > .gradient-button { float: right; margin-left: 10px; } td > form { float:right } 
     <table> <tbody> <tr> <th>Vacancy Id:</th> <td> 32 <a href="https://sunnygeorgia.travel/create-vacancies/?fesid=32" class="gradient-button" title="Редактировать">Редактировать</a> <form method="post" name="delete_vacancy_32" id="delete_vacancy_32"> <input type="hidden" class="delete_vacancy_id" value="32"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="dec425659d"> <input type="hidden" name="_wp_http_referer" value="/my-vacancies/?accid=6035"> <a href="#" class="gradient-button button-delete button-delete-vacancy" title="Удалить">Удалить</a> </form> </td> </tr> <tr> <th>Тип номера:</th> <td>Улучшенный двухместный номер</td> </tr> <tr> <th>Свободные номера:</th> <td>10</td> </tr> <tr> <th>Дата начала:</th> <td>24.08.2016</td> </tr> <tr> <th>Дата окончания:</th> <td>31.08.2017</td> </tr> <tr> <th>Цена:</th> <td>$25.00</td> </tr> </tbody> </table> 

    0 vote against

    Everything can be done) Will work regardless of the form id

      The first version that came to my mind - just for each button (for the title) to ask your ID. You can also do something like this:

      a { float: right; margin-bottom:25px; color: #384250; font-weight: 600; text-decoration: none; -webkit-transition: all 0.1s ease-in 0.1s; -moz-transition: all 0.1s ease-in 0.1s; -o-transition: all 0.1s ease-in 0.1s; -ms-transition: all 0.1s ease-in 0.1s; transition: all 0.1s ease-in 0.1s; }

      But then again, you will not be able to change their position relative to each other, since the style is attributed to a particular title. I hope I helped you.

      Sincerely, Anton

         html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code, del, dfn, em, img, ins, q, small, strong, sub, sup, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, input, table, caption, tbody, tfoot, thead, tr, th, td, figure { border: 0; margin: 0; padding: 0; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } table td { background: #fff; border: 1px solid #ccc; color: #454545; padding: 13px; } .b-info .gradient-button { float: right; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } button, input, select, textarea { margin: 0; vertical-align: baseline; outline: none; -webkit-box-shadow: none; -moz-box-shadow: none; box-shadow: none; -webkit-transition: all 0.2s ease-in; -moz-transition: all 0.2s ease-in; -o-transition: all 0.2s ease-in; -ms-transition: all 0.2s ease-in; transition: all 0.2s ease-in; } .gradient-button, .wpcf7-submit, .form-submit #submit, button, input[type="button"], input[type="reset"], input[type="submit"] { font-size: 13px; line-height: 28px; font-weight: 700; color: #F74B60!important; height: 32px; padding: 0 5px !important; text-align: center; display: inline-block; background-color: #fff; border-radius: 6px; border: 2px solid #F74B60; } table { border-collapse: collapse; border-spacing: 0; width: 100%; margin: 0 0 30px; } a { color: #384250; font-weight: 600; text-decoration: none; -webkit-transition: all 0.1s ease-in 0.1s; -moz-transition: all 0.1s ease-in 0.1s; -o-transition: all 0.1s ease-in 0.1s; -ms-transition: all 0.1s ease-in 0.1s; transition: all 0.1s ease-in 0.1s; } info th { width: 30%; } table th { background: #E9E6E0; border: 1px solid #ccc; padding: 13px; text-align: left; font-size: 13px; font-weight: 600; vertical-align: top; } input, button, select, textarea { font-family: inherit; font-size: inherit; line-height: inherit; } #delete_vacancy_32, .gradient-button {float: right; margin-left: 10px;} 
         <table> <tbody> <tr> <th>Vacancy Id:</th> <td> 32 <form method="post" name="delete_vacancy_32" id="delete_vacancy_32"> <input type="hidden" class="delete_vacancy_id" value="32"> <input type="hidden" id="_wpnonce" name="_wpnonce" value="dec425659d"> <input type="hidden" name="_wp_http_referer" value="/my-vacancies/?accid=6035"> <a href="#" class="gradient-button button-delete button-delete-vacancy" title="Удалить">Удалить</a> </form> <a href="https://sunnygeorgia.travel/create-vacancies/?fesid=32" class="gradient-button" title="Редактировать">Редактировать</a> </td> </tr> <tr> <th>Тип номера:</th> <td>Улучшенный двухместный номер</td> </tr> <tr> <th>Свободные номера:</th> <td>10</td> </tr> <tr> <th>Дата начала:</th> <td>24.08.2016</td> </tr> <tr> <th>Дата окончания:</th> <td>31.08.2017</td> </tr> <tr> <th>Цена:</th> <td>$25.00</td> </tr> </tbody> </table> 

        • The fact is that it is suitable only for this ID (32), and this will not apply to others. - Valery Emelyanov
        • @ Valery Yemelyanov replace #delete_vacancy_32 with a form . And it is better to add a common class to all these forms and register it instead of the form . - Vedenin