html
1<!DOCTYPE html> 2<html> 3 <head> 4 <link rel="stylesheet" type="text/css" href="test.css"> 5 </head> 6 <body> 7 <div id="wrapper"> 8 <div id="confirm_text"> 9 <div>text</div> 10 <div>text</div> 11 <div>text</div> 12 <div>text</div> 13 </div> 14 <form action="" method="post"> 15 <div class="form_confA"> 16 <input type="submit" name="done" value="送信" id="submit_button"> 17 </div> 18 </form> 19 20 <form action="contactito.php" method="post"> 21 <div class="formB"> 22 <input type="submit" name="to_correct" value="修正" id="submit_button"> 23 </div> 24 </form> 25 </div> 26 </body> 27</html>
css
1@charset "UTF-8"; 2 3#wrapper{ 4 max-width: 1000px; 5 margin: 0 auto; 6 padding: 0; 7} 8form{ 9 max-width: 290px; 10 margin: 0 auto; 11} 12 13input{ 14 width: 260px; 15 border-radius: 10px; 16 padding: 10px; 17 margin-bottom: 5px; 18} 19 20 21#submit_wrap{ 22 text-align: center; 23 width: 96%; 24} 25 26#submit_button{ 27 border-radius: 20px; 28 width: 8em; 29 margin-top: 10px; 30 margin-bottom: 10px; 31} 32 33/*確認画面*/ 34 35#confirm_text{ 36 line-height: 2em; 37 color: #645A46; 38 width: 40%; 39 margin: 0 auto; 40} 41 42#confirm_text p{ 43 margin: 0; 44} 45 46.form_confA{ 47 width: 50%; 48} 49 50 51.form_confB{ 52 width: 50%; 53}
このフォームは送信ボタンを押された後の確認画面を想定しています。
ふたつのボタンを横並びにしたいのですが、どうしても縦並びになってしまいます。
formの領域が影響していることはわかっているのですが、前ページの入力フォームで使用していて可能な限りCSSを変更したくなくて、それ以外のものを試行錯誤したいのですが、うまくいきませんでした。
どうぞよろしくアドバイスをお願いいたします。

回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/10/15 21:47