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

質問編集履歴

2

tableタグの使用から、flexの使用への変更

2021/09/14 16:23

投稿

bibibin07
bibibin07

スコア7

title CHANGED
File without changes
body CHANGED
@@ -6,6 +6,8 @@
6
6
  回答よろしくお願いいたします。
7
7
  ### 発生している問題・エラーメッセージ
8
8
  ![イメージ説明](9ae936b48372336d05c2e5b0039e4c1b.png)
9
+ ↓ 調整後
10
+ ![イメージ説明](5280c854452a0bc9121d7a4fe12088ae.png)
9
11
 
10
12
 
11
13
  ### 該当のソースコード
@@ -43,11 +45,94 @@
43
45
  width: 240px;
44
46
  }
45
47
 
48
+ HTML 変更後↓
46
49
 
50
+ <div class="profile">
51
+ <div class="world">
52
+ <img src="https://s3-ap-northeast-1.amazonaws.com/paspol-images/wp-content/uploads/2021/01/wh_thumb2.png">
53
+ <p>地球一周 365日 <br>
54
+ 世界遺産絶景の旅</p>
47
55
 
56
+ </div>
57
+
58
+ <div class="kyoto">
59
+ <img src="https://s3-ap-northeast-1.amazonaws.com/paspol-images/wp-content/uploads/2020/12/kyoto365_thumnail-1.png">
60
+ <p> 365日 京都 絶景の旅</p>
61
+ </div>
62
+
63
+ <div class="Hokkaido">
64
+ <img src="https://s3-ap-northeast-1.amazonaws.com/paspol-images/wp-content/uploads/2020/09/banner_thumb1.png">
65
+ <p>365日 北海道 絶景<br>
66
+ 日めくりカレンダー</p>
67
+ </div>
68
+ </div>
69
+
70
+ css 変更後
71
+
72
+ .profile {
73
+ width: 100%;
74
+ display: flex;
75
+
76
+ }
77
+
78
+ .world img {
79
+ width: 240px;
80
+ margin-left: 360px;
81
+ margin-right: 30px;
82
+ }
83
+
84
+ .world p {
85
+ font-family:"Helvetica Neue", Helvetica, Arial, 游ゴシック, YuGothic, "ヒラギノ角ゴ ProN W3"
86
+ , "Hiragino Kaku Gothic ProN", メイリオ, Meiryo, sans-serif; ;
87
+ font-style: normal;
88
+ color: #13191b;
89
+ font-size: 20px;
90
+ font-weight: 700;
91
+ line-height: 34px;
92
+ margin-left: 360px;
93
+ margin-right: 30px;
94
+ text-align: center;
95
+ }
96
+
97
+ .kyoto img {
98
+ width: 240px;
99
+ }
100
+
101
+ .kyoto p {
102
+ font-family:"Helvetica Neue", Helvetica, Arial, 游ゴシック, YuGothic, "ヒラギノ角ゴ ProN W3"
103
+ , "Hiragino Kaku Gothic ProN", メイリオ, Meiryo, sans-serif; ;
104
+ font-style: normal;
105
+ color: #13191b;
106
+ font-size: 20px;
107
+ font-weight: 700;
108
+ line-height: 34px;
109
+ text-align: center;
110
+ }
111
+
112
+ .Hokkaido img {
113
+ width: 240px;
114
+ margin-left: 30px;
115
+ }
116
+
117
+ .Hokkaido p {
118
+ font-family:"Helvetica Neue", Helvetica, Arial, 游ゴシック, YuGothic, "ヒラギノ角ゴ ProN W3"
119
+ , "Hiragino Kaku Gothic ProN", メイリオ, Meiryo, sans-serif; ;
120
+ font-style: normal;
121
+ color: #13191b;
122
+ font-size: 20px;
123
+ font-weight: 700;
124
+ line-height: 34px;
125
+ text-align: center;
126
+ }
127
+
128
+
129
+
130
+
131
+
48
132
  ### 試したこと
49
133
 
50
- ここに問題に対して試したことを記載してださい。
134
+ 画像文字divでくって、display: flex;
135
+ を使用し、そこから微調整。
51
136
 
52
137
  ### 補足情報(FW/ツールのバージョンなど)
53
138
 

1

誤字の修正

2021/09/14 16:23

投稿

bibibin07
bibibin07

スコア7

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,6 @@
1
1
  ### 前提・実現したいこと
2
2
 
3
- 現在Pas-Polというサイトの模写をやっています。https://pas-pol.jp/ tableを使って三枚の画像を並べました。そうすると画像と画像の間に空白が開きすぎてしまいました。 https://pas-pol.jp/ これをこのサイトのような間隔にするにはどうすればいいのでしょうか?marginで調節しようとしましたが自力ではうまくいきませんでした。また二段目の写真の調節もうまくいきません。
3
+ 現在Pas-Polというサイトの模写をやっています。https://pas-pol.jp/ tableを使って三枚の画像を並べました。そうすると画像と画像の間に空白が開きすぎてしまいました。 https://pas-pol.jp/ これをこのサイトの3section目の三枚の画像のような間隔にするにはどうすればいいのでしょうか?marginで調節しようとしましたが自力ではうまくいきませんでした。また二段目の写真の調節もうまくいきません。
4
4
 
5
5
  tableタグを使った時、cssで思うように画像の位置などを調節できなくなります。
6
6
  回答よろしくお願いいたします。