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

質問編集履歴

3

追記の追記

2018/11/10 09:13

投稿

komo_ta
komo_ta

スコア275

title CHANGED
File without changes
body CHANGED
@@ -76,4 +76,10 @@
76
76
  margin-top: 5px;
77
77
  font-size: 14px;
78
78
  }
79
- ```
79
+ ```
80
+
81
+ 上記の実装についての補足ですが、
82
+ 上記で話しました、「犬のイメージと、Testのテキスト」を `new-user-item` として、くくっておりまして、 その親の `new-users-list` 内で `new-user-item`に`float : left` プロパティで持たせて、表示できないかと考えていました。6番目の `new-user-item` が5番目の `new-user-item` の右側に回り込まない状況です。
83
+
84
+ またこちらのリンクを参考に、 `overflow-x : scroll` を使って実装しようとしましたが、横スクロールにならず縦のスクロールになってしまいました。
85
+ https://www.tagindex.com/stylesheet/box/overflow2.html

2

該当箇所のコードを記述しました。

2018/11/10 09:13

投稿

komo_ta
komo_ta

スコア275

title CHANGED
File without changes
body CHANGED
@@ -16,4 +16,64 @@
16
16
 
17
17
  ![イメージ説明](babeee1d9a3196af57e45266fbc2fc40.png)
18
18
 
19
- どうぞよろしくお願いします。m(_ _)m
19
+ どうぞよろしくお願いします。m(_ _)m
20
+
21
+ ## 追記
22
+ 該当のコードを追記します
23
+
24
+ **test.html**
25
+ ```
26
+ <div class="new-users-section">
27
+ <div class="section-title"><b>新着ユーザーさん</b></div>
28
+ <div class="new-users-list">
29
+ <div class="new-user-item">
30
+ <img class="new-user-icon" src="https://www.min-inuzukan.com/images/dog_img_long-chihuahua.jpg?18102302">
31
+ <div class="new-user-name">Test</div>
32
+ </div>
33
+ <div class="new-user-item">
34
+ <img class="new-user-icon" src="https://www.min-inuzukan.com/images/dog_img_long-chihuahua.jpg?18102302">
35
+ <div class="new-user-name">Test</div>
36
+ </div>
37
+
38
+ ```
39
+
40
+ **test.css**
41
+ ```
42
+ .new-users-section {
43
+ width: 670px;
44
+ margin: 60px auto 0 auto;
45
+ }
46
+
47
+ .section-title {
48
+ width: 95%;
49
+ margin: 0 auto 0 auto;
50
+ font-size: 20px;
51
+ }
52
+
53
+ .new-users-list {
54
+ height: 130px;
55
+ width: 95%;
56
+ margin: 20px auto 60px auto;
57
+ }
58
+
59
+ .new-user-item {
60
+ width: 120px;
61
+ height: 130px;
62
+ float: left;
63
+ }
64
+
65
+ .new-user-icon {
66
+ width: 100px;
67
+ height: 100px;
68
+ border-radius: 50%;
69
+ display: block;
70
+ }
71
+
72
+ .new-user-name {
73
+ width: 100px;
74
+ margin-left: 0;
75
+ text-align: center;
76
+ margin-top: 5px;
77
+ font-size: 14px;
78
+ }
79
+ ```

1

リンクを修正しました

2018/11/10 08:49

投稿

komo_ta
komo_ta

スコア275

title CHANGED
File without changes
body CHANGED
@@ -12,8 +12,7 @@
12
12
 
13
13
  この場合htmlとcssで表示する方法はあるのでしょうか?
14
14
 
15
- 完成イメージですが、こちらのリンク先の「人気の占い師」というセクションあたります。
15
+ 完成イメージですが、こちらの[リンク](https://miror.jp/)先の「人気の占い師」というセクションあたります。
16
- https://miror.jp/
17
16
 
18
17
  ![イメージ説明](babeee1d9a3196af57e45266fbc2fc40.png)
19
18