質問編集履歴
3
打ち消し線の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
|
7
7
|
**解決したいこと**
|
8
8
|
・SPビュー時にテキストを画像やタイトルの下に下げたい。
|
9
|
-
|
9
|
+
~~「曜日、サーバーエンド、タイトル、画像」「画像以外の要素」を同じdivでまとめて、コードを書いたり、flexやfloatなどを使用し、色々試してみたんんですが、思う様にいかず手詰まりな状態です。
|
10
10
|
コードを書き始めたばかりで、引き出しや調べ方が乏しいのでこちらを使わせて頂きました。
|
11
|
-
何か良い方法はありませんでしょうか。
|
11
|
+
何か良い方法はありませんでしょうか。~~
|
12
12
|
|
13
13
|
**以下修正点**
|
14
14
|
floatとclear:bothを使って、段を下げれる事が分かりました。
|
2
質問や画像の変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,25 +1,22 @@
|
|
1
|
-
①PC
|
1
|
+
①PCビュー
|
2
|
-
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-
|
2
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-23/e981e89b-d4ac-41ef-aeb2-2f4cd72d1acc.png)
|
3
3
|
|
4
|
-
②SP
|
4
|
+
②SPビュー
|
5
|
-
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-
|
5
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-23/69d8a35f-7378-4cc3-b878-e0f4d2d00215.png)
|
6
6
|
|
7
7
|
**解決したいこと**
|
8
8
|
・SPビュー時にテキストを画像やタイトルの下に下げたい。
|
9
|
-
|
10
|
-
「曜日、サーバーエンド、タイトル、画像」「画像以外の要素」を同じdivでまとめて、コードを書いたり、flexやfloatなどを使用し、色々試してみたんんですが、思う様にいかず手詰まりな状態です。
|
9
|
+
--「曜日、サーバーエンド、タイトル、画像」「画像以外の要素」を同じdivでまとめて、コードを書いたり、flexやfloatなどを使用し、色々試してみたんんですが、思う様にいかず手詰まりな状態です。
|
11
10
|
コードを書き始めたばかりで、引き出しや調べ方が乏しいのでこちらを使わせて頂きました。
|
12
11
|
何か良い方法はありませんでしょうか。
|
13
12
|
|
14
|
-
|
15
13
|
**以下修正点**
|
16
|
-
floatとclear:bothを使って、段を下げる事が分かりました。
|
14
|
+
floatとclear:bothを使って、段を下げれる事が分かりました。
|
17
|
-
しかし、
|
15
|
+
しかし、現在のコードに原因があるのか、「clear:both」が効きません。
|
18
|
-
|
16
|
+
何が原因で、下の段に落ちないのかわからず、質問させて頂きました。
|
19
17
|
打開策はありませんでしょうか。
|
20
18
|
|
21
|
-
|
19
|
+
|
22
|
-
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-19/5048b0fc-3b9c-4961-9e39-4b0e8f30fa1f.png)
|
23
20
|
|
24
21
|
|
25
22
|
過去に同じような質問をしておりますが、質問の質が悪く、削除申請中です。
|
@@ -28,33 +25,151 @@
|
|
28
25
|
<div class="container">
|
29
26
|
<div class="row">
|
30
27
|
<div class="col-md-8 col-12">
|
31
|
-
<div class="
|
28
|
+
<div class="mod-article border-bottom clearfix">
|
32
|
-
<div class="float-left">
|
29
|
+
<div class="list-article-left float-left">
|
33
|
-
<div class="d-flex flex-m
|
30
|
+
<div class="d-flex flex-column flex-wrap flex-md-row mb-2 mb-md-4">
|
34
31
|
<time datetime="2022-3-8" itemprop="datepublished" class="mb-1 mb-md-0 mr-0 mr-md-5">2022.03.28</time>
|
35
32
|
<ul class="ctg-term d-flex align-items-center flex-nowrap">
|
36
33
|
<li class="tid-2">サーバーサイド</li>
|
37
34
|
<li class="tid-26">モジュール</li>
|
38
35
|
</ul>
|
39
36
|
</div>
|
40
|
-
<h3 class="line-clamp line-3 line-md-2 mb-
|
37
|
+
<h3 class="line-clamp line-3 line-md-2 mb-0">
|
41
38
|
これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.
|
42
39
|
</h3>
|
43
|
-
<div class="clear:both">
|
40
|
+
<div class="clear-text clear:both">
|
44
41
|
<p class="line-clamp line-2 line-md-3 cl-gray mb-2 mb-md-4">
|
45
42
|
これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.
|
46
43
|
</p>
|
47
44
|
<div class="author d-flex align-items-center flex-no-wrap" data-swiper-parallax="-1000">
|
48
|
-
<img src="
|
45
|
+
<img src="" loading="lazy" alt="Taro Tanaka" />Shin Kanemitsu
|
49
46
|
</div>
|
50
47
|
</div>
|
51
48
|
</div>
|
52
|
-
<div class="float-right">
|
49
|
+
<div class="list-img float-right">
|
53
|
-
<img src="
|
50
|
+
<img src="" loading="lazy" alt="">
|
54
51
|
</div>
|
55
52
|
</div>
|
56
53
|
</div>
|
57
54
|
</div>
|
58
55
|
</div>
|
56
|
+
```
|
57
|
+
```css
|
58
|
+
.mod-article a{
|
59
|
+
padding: 10px 0;
|
60
|
+
border-bottom: 1px solid #707070;
|
61
|
+
}
|
62
|
+
.mod-article .img-wrap{
|
63
|
+
width: 34.5%;
|
64
|
+
}
|
65
|
+
.mod-article .img-wrap::before{
|
66
|
+
padding-top: 70%;
|
67
|
+
}
|
68
|
+
.mod-article time{
|
69
|
+
font-size: .75rem; /*12px*/
|
70
|
+
}
|
71
|
+
.mod-article h3{
|
72
|
+
font-size: .875rem; /*14px*/
|
73
|
+
font-weight: 500;
|
74
|
+
line-height: 1.3;
|
75
|
+
}
|
76
|
+
.mod-article p{
|
77
|
+
font-size: .75rem; /*12px*/
|
78
|
+
line-height: 1.45;
|
79
|
+
}
|
80
|
+
.ctg-term{
|
81
|
+
font-size: .625rem; /*10px*/
|
82
|
+
}
|
83
|
+
.ctg-term li:not(:last-child){
|
84
|
+
margin-right: 10px;
|
85
|
+
}
|
86
|
+
.ctg-term li.tid-2{color: #0392D9;}
|
87
|
+
.ctg-term li.tid-26{color: #09B902;}
|
88
|
+
.ctg-term li::before{
|
89
|
+
font-family: "Font Awesome 5 Free";
|
90
|
+
font-weight: 900;
|
91
|
+
content: "\f02b";
|
92
|
+
margin-right: 2px;
|
93
|
+
}
|
94
|
+
.author{
|
95
|
+
font-size: .75rem; /*12px*/
|
96
|
+
font-weight: 500;
|
97
|
+
}
|
98
|
+
.author img{
|
99
|
+
width: 25px;
|
100
|
+
height: 25px;
|
101
|
+
object-fit: contain;
|
102
|
+
margin-right: 5px;
|
103
|
+
}
|
104
|
+
|
105
|
+
@media (min-width: 768px) {
|
106
|
+
.mod-article a{
|
107
|
+
padding: 0;
|
108
|
+
border-bottom: none;
|
109
|
+
}
|
110
|
+
.mod-article .img-wrap{
|
111
|
+
width: 100%;
|
112
|
+
}
|
113
|
+
.mod-article h3{
|
114
|
+
font-size: 1.875rem; /*30px*/
|
115
|
+
}
|
116
|
+
.mod-article time{
|
117
|
+
font-size: 1.5625rem; /*25px*/
|
118
|
+
}
|
119
|
+
.mod-article p{
|
120
|
+
font-size: 1.5rem; /*24px*/
|
121
|
+
}
|
122
|
+
.ctg-term{
|
123
|
+
font-size: .75rem; /*12px*/
|
124
|
+
}
|
125
|
+
.author{
|
126
|
+
font-size: 1.125rem; /*18px*/
|
127
|
+
}
|
128
|
+
.author img{
|
129
|
+
width: 50px;
|
130
|
+
height: 50px;
|
131
|
+
margin-right: 20px;
|
132
|
+
}
|
133
|
+
}
|
134
|
+
@media (min-width: 992px) {
|
135
|
+
.ctg-term{
|
136
|
+
font-size: 1rem; /*16px*/
|
137
|
+
}
|
138
|
+
.author{
|
139
|
+
font-size: 1.25rem; /*20px*/
|
140
|
+
}
|
141
|
+
}
|
142
|
+
@media (min-width: 1200px) {
|
143
|
+
.ctg-term{
|
144
|
+
font-size: 1rem; /*18px*/
|
145
|
+
}
|
146
|
+
.author{
|
147
|
+
font-size: 1.5625rem; /*25px*/
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
151
|
+
.clear-text{
|
152
|
+
clear: both;
|
153
|
+
}
|
154
|
+
|
155
|
+
/* list左よせ */
|
156
|
+
.list-article-left{
|
157
|
+
max-width: 60%;
|
158
|
+
}
|
159
|
+
@media (min-width: 768px) {
|
160
|
+
.list-img{
|
161
|
+
width: 60%;
|
162
|
+
}
|
163
|
+
}
|
164
|
+
|
165
|
+
.list-img{
|
166
|
+
width: 40%;
|
167
|
+
}
|
168
|
+
|
169
|
+
@media (min-width: 768px) {
|
170
|
+
.list-img{
|
171
|
+
width: 34.5% !important;
|
172
|
+
}
|
173
|
+
}
|
59
174
|
|
60
175
|
```
|
1
修正を行いました
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,38 +11,50 @@
|
|
11
11
|
コードを書き始めたばかりで、引き出しや調べ方が乏しいのでこちらを使わせて頂きました。
|
12
12
|
何か良い方法はありませんでしょうか。
|
13
13
|
|
14
|
+
|
15
|
+
**以下修正点**
|
16
|
+
floatとclear:bothを使って、段を下げる事が分かりました。
|
17
|
+
しかし、③の画像で選択している要素が幅をとってしまい、画像が右に行かず、段落ちしてしまいます。
|
18
|
+
解決策が、思い付かず困っております。
|
19
|
+
打開策はありませんでしょうか。
|
20
|
+
|
21
|
+
③
|
22
|
+
![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2022-05-19/5048b0fc-3b9c-4961-9e39-4b0e8f30fa1f.png)
|
23
|
+
|
24
|
+
|
14
25
|
過去に同じような質問をしておりますが、質問の質が悪く、削除申請中です。
|
15
26
|
|
16
27
|
```html
|
17
|
-
|
28
|
+
<div class="container">
|
18
|
-
|
29
|
+
<div class="row">
|
19
|
-
|
30
|
+
<div class="col-md-8 col-12">
|
20
|
-
|
31
|
+
<div class="list-box row border-bottom">
|
21
|
-
|
32
|
+
<div class="float-left">
|
22
|
-
|
33
|
+
<div class="d-flex flex-md-row flex-column mb-2 mb-md-4">
|
23
|
-
|
34
|
+
<time datetime="2022-3-8" itemprop="datepublished" class="mb-1 mb-md-0 mr-0 mr-md-5">2022.03.28</time>
|
24
|
-
|
35
|
+
<ul class="ctg-term d-flex align-items-center flex-nowrap">
|
25
|
-
|
36
|
+
<li class="tid-2">サーバーサイド</li>
|
26
|
-
|
37
|
+
<li class="tid-26">モジュール</li>
|
27
|
-
|
38
|
+
</ul>
|
28
|
-
|
39
|
+
</div>
|
29
|
-
|
40
|
+
<h3 class="line-clamp line-3 line-md-2 mb-2">
|
30
|
-
|
41
|
+
これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.これはタイトルです。This is title.
|
31
|
-
|
42
|
+
</h3>
|
32
|
-
|
43
|
+
<div class="clear:both">
|
33
44
|
<p class="line-clamp line-2 line-md-3 cl-gray mb-2 mb-md-4">
|
34
45
|
これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.これは本文です。This is body text.
|
35
46
|
</p>
|
36
47
|
<div class="author d-flex align-items-center flex-no-wrap" data-swiper-parallax="-1000">
|
37
|
-
<img src="themes/custom/ore_no_drupal/img/author01.png" loading="lazy" alt="Shin Kanemitsu" />
|
48
|
+
<img src="themes/custom/ore_no_drupal/img/author01.png" loading="lazy" alt="Shin Kanemitsu" />Shin Kanemitsu
|
38
49
|
</div>
|
39
50
|
</div>
|
40
|
-
|
51
|
+
</div>
|
41
|
-
|
52
|
+
<div class="float-right">
|
42
|
-
|
53
|
+
<img src="themes/custom/ore_no_drupal/img/article02.png" loading="lazy" alt="">
|
43
|
-
</div>
|
44
54
|
</div>
|
45
55
|
</div>
|
46
56
|
</div>
|
47
57
|
</div>
|
58
|
+
</div>
|
59
|
+
|
48
60
|
```
|