実現したいこと
・募集部活動検索
・申請中の学校・部活動一覧
こちらのボタンが縦に長くなっているのを解決したいです
前提
理想はCommingSoonの下の余白を上の余白と同じ余白にしたい
該当のソースコード
erb
1<div id="<%= dom_id instructor %>"> 2 <div class="profile_container_action"> 3 <div class="profile_action"> 4 <h4 class="profile_action_mypage">マイページ</h4> 5 <div class="profile_action_application_comming"> 6 <%= link_to '募集部活動検索', my_coach_requests_for_instructor_coach_requests_path, class: 'profile_account_edit', disabled: true %> 7 <p class="comming">Comming Soon</p> 8 </div> 9 <div class="profile_action_application_comming"> 10 <%= link_to '申請中の学校・部活動一覧', my_coach_requests_for_instructor_coach_requests_path, class: 'profile_account_edit', disabled: true %> 11 <p class="comming">Comming Soon</p> 12 </div> 13 <div class="profile_action_application"> 14 <%= link_to '日程が確定した学校・部活動', my_coach_requests_for_instructor_coach_requests_path, class: 'profile_account_edit' %> 15 </div> 16 </div> 17 <div class="profile_container"> 18 <h4 class="profile_title">指導員プロフィール</h4> 19 <p style="color: #9b3938"><%= notice %></p> 20 <div class="profile_content"> 21 <div class="profile_item"> 22 <span class="profile_tag">NAME</span> 23 <%= instructor.name %> 24 </div> 25 <div class="profile_item"> 26 <span class="profile_tag">SCHOOL NAME</span> 27 <%= instructor.school_name %> 28 </div> 29 <div class="profile_item"> 30 <span class="profile_tag">EMAIL</span> 31 <%= instructor.email %> 32 </div> 33 <div class="profile_item"> 34 <span class="profile_tag">CAREER</span> 35 <%= instructor.career %> 36 </div> 37 <div class="profile_item"> 38 <span class="profile_tag">COACH CAREER</span> 39 <%= instructor.coach_career %> 40 </div> 41 <div class="profile_item"> 42 <span class="profile_tag">BIRTHDAY</span> 43 <%= instructor.birthday %> 44 </div> 45 <div class="profile_item"> 46 <span class="profile_tag">TELEPHONE NUMBER</span> 47 <%= instructor.telephone_number %> 48 </div> 49 <div class="profile_item"> 50 <span class="profile_tag">CLUBS</span> 51 <%= instructor.clubs.map(&:name).join(', ') %> 52 </div> 53 </div> 54 <div class="profile_action_content"> 55 <%# <%= button_to "アカウント削除", @instructor, method: :delete, class: "profile_account_delete" %> 56 <%= link_to "編集", edit_instructor_path(@instructor), class: "profile_account_edit"%> 57 </div> 58 </div> 59 </div> 60</div> 61
css
1.profile_container_action { 2 display: flex; 3 justify-content: space-around; 4 /* align-items: center; */ 5} 6 7@media screen and (max-width:768px) { 8 .profile_container_action { 9 display: block; 10 margin: 24px; 11 } 12} 13 14.profile_container { 15 display: grid; 16 margin: 24px; 17} 18 19.profile_title { 20 font-size: 32px; 21 margin: 18px; 22} 23 24@media screen and (max-width:768px) { 25 .profile_title { 26 font-size: 24px; 27 text-align: center; 28 margin: 0; 29 } 30} 31 32.profile_content { 33 width: 600px; 34} 35 36@media screen and (max-width:768px) { 37 .profile_content { 38 width: auto; 39 } 40} 41 42.profile_item { 43 display: grid; 44 gap: 4px; 45 margin: 14px 0px; 46 border-bottom: 1px solid #666666; 47 padding: 12px 0px; 48} 49 50span.profile_tag { 51 font-size: 12px; 52 color: #666666; 53 font-weight: bold; 54} 55 56.profile_action_content { 57 display: flex; 58 justify-content: flex-end; 59} 60 61.profile_account_delete { 62 background-color: transparent; 63 border: none; 64 cursor: pointer; 65 outline: none; 66 padding: 0; 67 appearance: none; 68 color: #666666; 69} 70 71.profile_account_edit { 72 padding-right: 8px; 73 color: #333; 74 text-decoration: none; 75} 76 77.profile_action { 78 display: grid; 79 80 gap: 32px; 81 82} 83 84@media screen and (max-width:768px) { 85 .profile_action { 86 padding: 18px; 87 } 88} 89 90.profile_action_mypage { 91 font-size: 32px; 92} 93 94.profile_action_application_comming { 95 display: inline-block; /* inline-blockに変更 */ 96 position: relative; /* 相対位置に設定 */ 97 padding: 18px 114px; 98 border: 3px solid #333; 99 border-radius: 20px; 100 font-weight: bold; 101 cursor: pointer; /* カーソルをポインターに変更 */ 102 text-align: center; /* テキストを中央揃えに変更 */ 103 text-decoration: none; /* テキストの下線を削除 */ 104 overflow: hidden; /* 親要素からはみ出さないようにする */ 105 box-shadow: 10px 10px 0px -5px #333; 106} 107 108.profile_action_application { 109 display: inline-block; /* inline-blockに変更 */ 110 position: relative; /* 相対位置に設定 */ 111 padding: 28px; 112 border: 3px solid #333; 113 border-radius: 20px; 114 font-weight: bold; 115 cursor: pointer; /* カーソルをポインターに変更 */ 116 text-align: center; /* テキストを中央揃えに変更 */ 117 text-decoration: none; /* テキストの下線を削除 */ 118 overflow: hidden; /* 親要素からはみ出さないようにする */ 119 box-shadow: 10px 10px 0px -5px #333; 120} 121 122.profile_action_application:hover { 123 background-color: #ede9e9; 124} 125 126@media screen and (max-width:768px) { 127 .profile_action_application_comming { 128 padding: 12px; 129 width: auto; 130 font-size: 14px; 131 } 132} 133 134@media screen and (max-width:768px) { 135 .profile_action_application { 136 padding: 24px; 137 width: auto; 138 font-size: 14px; 139 } 140} 141 142p.comming { 143 margin: 0; 144} 145 146label.instructor_checkbox { 147 display: flex; 148 align-items: center; 149 font-size: 15px; 150} 151
Gridを使用して実装使用としましたがわからず教えていただけますと幸いです。
よろしくお願い致します。

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