railsのcssとhtmlのソースコードをいじっています。
html
1<!DOCTYPE html> 2<html> 3 <head> 4 <title>TweetApp</title> 5 <%= csrf_meta_tags %> 6 7 <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> 8 <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> 9 </head> 10 11 <body> 12 <header> 13 <div class="header-logo"> 14 <%= link_to("TweetApp", "/") %> 15 </div> 16 <ul class="header-menus"> 17 <li> 18 <%= link_to("TweetAppとは", "/about") %> 19 </li> 20 </ul> 21 </header> 22 <%= yield %> 23 </body> 24</html>
css
1 2/* 共通レイアウト ================================ */ 3body { 4 color: #2d3133; 5 background-color: #3ecdc6; 6 margin: 0; 7 min-height: 1vh; 8} 9 10.main { 11 position: absolute; 12 top: 64px; 13 width: 100%; 14 height: auto; 15 min-height: 100%; 16 background-color: #f5f8fa; 17} 18 19.container { 20 max-width: 600px; 21 margin: 60px auto; 22 padding-left: 15px; 23 padding-right: 15px; 24 clear: both; 25} 26 27 28 29/* ヘッダー ================================ */ 30header { 31 height: 64px; 32 position: absolute; 33 z-index: 1; 34 width: 100%; 35} 36 37.header-logo { 38 float: left; 39 padding-left: 20px; 40 color: white; 41 font-size: 22px; 42 line-height: 64px; 43} 44 45.header-logo a{ 46 color: white; 47 font-size: 22px; 48} 49 50.header-menus { 51 float: right; 52 padding-right: 20px; 53} 54 55.header-menus li { 56 float: left; 57 line-height: 64px; 58 font-size: 13px; 59 color: white; 60 padding-left: 15px; 61} 62 63.header-menus a { 64 float: left; 65 font-size: 13px; 66 color: white; 67} 68 69.header-menus .fa { 70 padding-right: 5px; 71} 72 73.header-menus input[type="submit"] { 74 padding: 0 20px; 75 float: left; 76 line-height: 64px; 77 color: white; 78 margin: 0; 79 font-size: 13px; 80} 81
.header-logo a
はHTMLにないと思うのですが、.header-logo
のcolorは反映されず```.header-logo a
回答1件
あなたの回答
tips
プレビュー