前提
YouTubeの
Responsive hero | Build a responsive website from scratch (Part 7)
https://www.youtube.com/watch?v=oR4y973fDQ4&t=777s
34:00あたりにきてます。
実現したいこと
発生している問題・エラーメッセージ
該当のソースコード
該当箇所に🙋🙋マークがあります。
html
1 <div class="footer__cta"> 2 <a href="#" class="button">Request invite<a> 3 4 </div> 5 6 <div class="footer__copyright"> 7 <!-- ⭐特殊記号!! --> 8 © EasyBank. All Rights Reserved.</div> 9
footer.css
1.footer { 2 background-color: #2D314D; 3 color: white; 4 text-align: center; 5 padding: 2.5rem; 6} 7 8.footer a { 9 color: white; 10 11} 12 13 14.footer__logo { 15 /* 7/7 19:10 the margin did 16work for the other elements because those are divs and is by nature they are 17by default display block elements */ 18 display: inline-block; 19 margin-bottom: 1.875rem; 20 21} 22 23 24 25.footer__social { 26 margin-bottom: 1.875rem; 27} 28 29.footer__social a { 30 display: inline-block; 31} 32 33/* 7/7 20:00⭐not last-childがないときれいにセンターにならない */ 34.footer__social a:not(:last-child) { 35 margin-right: 1rem 36} 37 38 39.footer__links { 40 41 display: flex; 42 /* ⭐7/7 21:00 */ 43 flex-direction: column; 44 /* because it's vertical align items should control the width of 45the children */ 46align-items: center; 47 48} 49 50.footer__links a { 51 /* a 自体にline-height */ 52 line-height: 2.5; 53} 54 55.col1 { 56} 57 58.col2 { 59 /* margin-bottom: 1.875rem; */ 60} 61 62.footer__cta { 63 margin: 1.875rem; 64 65} 66 67🙋🙋 68.footer__copyright { 69 font-size: 0.8125rem; 70 color: hsl(233, 8%, 62%); 71 72} 73 74.attribution { 75 margin-top: 1.875rem; 76 77} 78 79
mixin.css
1@media screen and (min-width: 768px) { 2 3 .footer__links { 4 align-items: baseline; 5 } 6 7 8 /* grid */ 9 .grid-container { 10 display: grid; 11 grid-template-columns: 2fr 1fr 1fr 3fr; 12 /* grid-template-rows: repeat(2, 1fr); */ 13 grid-template-rows: 1fr auto; 14 grid-template-areas: 15 /* 複数のrowを同じのがまたぐときは2回言う */ 16 "logo links1 links2 cta" 17 "social links1 links2 copyright"; 18 19 justify-items: start; 20 text-align: left; 21 22 23 } 24 25 .footer__logo { 26 grid-area: logo; 27 } 28 29 .col1 { 30 grid-area: links1; 31 } 32 33 .col2 { 34 grid-area: links2; 35 36 37 } 38 39 .footer__cta { 40 grid-area: cta; 41 42 /* margin: 0 0 1.875rem 0; */ 43 justify-self: end; 44 text-align: right; 45 46 } 47 48 .footer__social { 49 grid-area: social; 50 51 } 52 53🙋🙋 54 .footer__copyright { 55 grid-area: copyright; 56 57 justify-self: end; 58 text-align: right; 59 } 60 61} 62
試したこと
mixin.css内で
mixin.css
1 .footer__copyright { 2 grid-area: copyright; 3 4 display: flex; 5 justify-self: end; 6 }
をしてみましたが、変わりませんでした。。。
回答1件
あなたの回答
tips
プレビュー