質問編集履歴

3

情報追加

2019/09/19 08:21

投稿

ayako_sato
ayako_sato

スコア8

test CHANGED
File without changes
test CHANGED
@@ -2,9 +2,59 @@
2
2
 
3
3
 
4
4
 
5
- railsつかっておりSCSS編集しています
5
+ プライバシーポリシーの記載されたページを、幅全体のうち80%表示範囲として文章を表示させたい。
6
6
 
7
- ページ全体うち80%を表示範囲として文章を表示せたい。
7
+ しかし現時点でscss記述が反映れない。
8
+
9
+
10
+
11
+ railsを、SCSSを編集しています。
12
+
13
+ SCCSファイルは二個あります、一つは「①application.scss」もう一つは「②static_page.scss」です。
14
+
15
+ 各クラスの要素やプロパティのコードは「②static_page.scss」にあります。
16
+
17
+ 前者「①application.scss」は下記のような記述になっています。
18
+
19
+
20
+
21
+
22
+
23
+ ```scss
24
+
25
+ /*
26
+
27
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
28
+
29
+ * listed below.
30
+
31
+ *
32
+
33
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
34
+
35
+ * vendor/assets/stylesheets directory can be referenced here using a relative path.
36
+
37
+ *
38
+
39
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
40
+
41
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
42
+
43
+ * files in this directory. Styles in this file should be added after the last require_* statement.
44
+
45
+ * It is generally better to create a new file per style scope.
46
+
47
+ *
48
+
49
+ */
50
+
51
+
52
+
53
+ @import "font-awesome";
54
+
55
+ @import "static_page";
56
+
57
+ ```
8
58
 
9
59
 
10
60
 
@@ -14,9 +64,7 @@
14
64
 
15
65
  クラスで80%幅で中央に表示するよう指定しているのですが要素が反映されず、画面横幅いっぱいになって折り返す仕様になってしまいます。
16
66
 
17
- のページ以外はきちんとscssを読み込んでおり問題なく反映されていす。
67
+ パスについては、htmlファイルhead部分で「②static_page.scss」へのリンクについて記載があり、さらにプライバシーポリシーのページ以外のプロパティは反映されているので通っていると思うのでが…
18
-
19
-
20
68
 
21
69
  ![イメージ説明](7d6b688283f30e690e9bb1c39dff1fd9.png)
22
70
 

2

不足情報追加

2019/09/19 08:21

投稿

ayako_sato
ayako_sato

スコア8

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,8 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
3
 
4
+
5
+ railsをつかっており、SCSSを編集しています。
4
6
 
5
7
  ページ全体のうち80%を表示範囲として文章を表示させたい。
6
8
 
@@ -10,7 +12,11 @@
10
12
 
11
13
 
12
14
 
13
- クラスで80%幅で中央に表示するよう指定しているのですが要素が反映されず、画面横幅いっぱいなって折り返す仕様になってしまいます。
15
+ クラスで80%幅で中央に表示するよう指定しているのですが要素が反映されず、画面横幅いっぱいなって折り返す仕様になってしまいます。
16
+
17
+ ※このページ以外はきちんとscssを読み込んでおり問題なく反映されています。
18
+
19
+
14
20
 
15
21
  ![イメージ説明](7d6b688283f30e690e9bb1c39dff1fd9.png)
16
22
 

1

情報追加

2019/09/19 06:10

投稿

ayako_sato
ayako_sato

スコア8

test CHANGED
File without changes
test CHANGED
@@ -112,7 +112,7 @@
112
112
 
113
113
  px指定にしたり、マージンを個別に指定したりしてみましたが変化ありませんでした。
114
114
 
115
- 検証で直接入力するとうまくいくのですが実際ファイルに追加すると反映されません。
115
+ 検証でelement.style {}へ直接入力するとうまくいくのですが実際ファイルに追加すると反映されません。
116
116
 
117
117
 
118
118