teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

cssファイル、scssファイルの追加

2021/04/17 08:27

投稿

gsbzn_
gsbzn_

スコア4

title CHANGED
File without changes
body CHANGED
@@ -9,4 +9,88 @@
9
9
 
10
10
  rails 5.2.4
11
11
  ruby 2.6.2
12
- dockerを用いて開発しています。
12
+ dockerを用いて開発しています。
13
+
14
+
15
+ welcome.scss
16
+ ```
17
+
18
+ #welcome-index {
19
+ .content-wrapper{
20
+ display: flex;
21
+
22
+ .content-block{
23
+ background-color: blueviolet;
24
+ width: 80%;
25
+ height: 200px;
26
+ }
27
+ .sidebar{
28
+ background-color: cornflowerblue;
29
+ width: 20%;
30
+ height: 200px;
31
+ }
32
+ }
33
+ }
34
+ ```
35
+ application.css.scss
36
+ ```
37
+ @import 'welcome';
38
+
39
+ /*
40
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
41
+ * listed below.
42
+ *
43
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
44
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
45
+ *
46
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
47
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
48
+ * files in this directory. Styles in this file should be added after the last require_* statement.
49
+ * It is generally better to create a new file per style scope.
50
+ *
51
+ *= require_tree .
52
+ *= require_self
53
+ */
54
+
55
+ #header {
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: space-between;
59
+ }
60
+
61
+ #header #nav {
62
+ list-style: none;
63
+ display: flex;
64
+ }
65
+
66
+
67
+
68
+ #header #nav li {
69
+ width: 140px;
70
+ text-align: center;
71
+ background-color: #333;
72
+ height: 50px;
73
+ line-height: 50px;
74
+ margin-right: 2px;
75
+ }
76
+
77
+ #header #nav li a {
78
+ text-decoration: none;
79
+ color: #fff;
80
+ font-weight: bold;
81
+ padding: 20px;
82
+ }
83
+
84
+ #footer {
85
+ background-color: #333;
86
+ color: #fff;
87
+ text-align: center;
88
+ padding: 10px 0px;
89
+ font-size: 13px;
90
+ margin-top: 20px;
91
+ }
92
+
93
+ #footer p {
94
+ margin: 0px;
95
+ }
96
+ ```