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

質問編集履歴

1

フレックスボックスを使って再度やってみました。

2021/04/14 08:55

投稿

isykzk
isykzk

スコア6

title CHANGED
File without changes
body CHANGED
@@ -172,4 +172,163 @@
172
172
 
173
173
 
174
174
 
175
- ```
175
+ ```
176
+
177
+
178
+ フレックスにて改めてやってみました。
179
+ ```ここに言語を入力
180
+ <div id="main">
181
+ <div id="content"> 
182
+ <p><font size="3">東京ビートルズオフィシャルストアへようこそ。公式グッズ、CD、リマスター盤、ポスタ<br>ーの販売サイト</font></p>
183
+ </div>
184
+ <h2>Beatle News</h2>
185
+ <?php query_posts ('showposts=2&cat=2');
186
+ while(have_posts()):the_post(); ?>
187
+
188
+ <div id="section">
189
+ <div id="thumb">
190
+ <?php the_post_thumbnail(); ?>
191
+ </div>
192
+
193
+ <div id="desc">
194
+ <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
195
+ <?php the_excerpt(); ?>
196
+ </div>
197
+ <?php endwhile; ?>
198
+   </div>
199
+ </div>
200
+
201
+ <div id="right">
202
+ <h2>Live Schedule</h2>
203
+ <div id="right-main">
204
+ <ul>
205
+ <li><a href="a">7月20日東京 武道館</a></li>
206
+ <p>A席: 9800円 B席: 7000円</p>
207
+ <li><a href="a">7月24日横浜アリーナ</a></li>
208
+ <p>A席: 9800円 B席: 7000円</p>
209
+ <li><a href="a">7月30日幕張ロッテスタジアム</a></li>
210
+ <p>A席: 9800円 B席: 7000円</p>
211
+ </ul>
212
+ </div>
213
+ <div>
214
+ </div>
215
+ ```
216
+
217
+ ```ここに言語を入力
218
+ body{
219
+ margin: 0;
220
+ background-image: url("images/bg.jpg");
221
+ font-size: 12px;
222
+ }
223
+
224
+ #wrapper{
225
+ background: white;
226
+ width: 1000px;
227
+ margin: 0 auto;
228
+ height: 1050px;
229
+ }
230
+
231
+ h1 {
232
+ padding-left: 20px;
233
+ font-size: 30px;
234
+ }
235
+
236
+ #photo {
237
+ text-align: center;
238
+ }
239
+
240
+ #content p {
241
+ padding-left: 20px;
242
+ }
243
+
244
+ #header{
245
+ clear: both;
246
+ padding-top: 5px;
247
+ margin: 0 auto;
248
+ }
249
+
250
+ #header ul{
251
+ overflow: hidden;
252
+ padding-left: 5px;
253
+ margin: 0 auto;
254
+ }
255
+
256
+ #header li{
257
+ list-style: none;
258
+ font-size: 20px;
259
+ padding-bottom: 10px;
260
+ margin-left: 20px;
261
+ float: left;
262
+ font-weight:bold;
263
+ }
264
+
265
+ #top{
266
+ margin-left: 20px;
267
+ }
268
+
269
+ h2{
270
+ font-size: 25px;
271
+ margin-left: 20px;
272
+ margin-top: 0;
273
+ }
274
+
275
+ #top-jpg{
276
+ width: 960px;
277
+ height: 250px;
278
+ margin-bottom: 0;
279
+ padding-bottom: 0;
280
+ }
281
+
282
+ #desctiption p {
283
+ padding-left: 20px;
284
+ margin-top: 0;
285
+ }
286
+
287
+ #right-main h2{
288
+ border-bottom: 1px solid gray;
289
+ }
290
+
291
+ #right-main ul{
292
+ list-style: none;
293
+ }
294
+
295
+ #right-main li{
296
+ font-size: 19px;
297
+ font-weight: 800;
298
+ }
299
+
300
+ #right-main p{
301
+ font-size: 15px;
302
+ }
303
+
304
+ #footer{
305
+ clear: both;
306
+ }
307
+
308
+ #footer-wrapper{
309
+ background: #DBDBDB;
310
+ width: 900px;
311
+ height: 120px;
312
+ margin-left: 50px
313
+ }
314
+
315
+ #footer p{
316
+ padding-top: 60px;
317
+ text-align: center;
318
+ font-size: 15px;
319
+ }
320
+
321
+ #section {
322
+ display: flex;
323
+ }
324
+
325
+ #desc {
326
+ width: 300px;
327
+ }
328
+
329
+ ```
330
+
331
+ としてみたのですが、希望通りになりません。
332
+ 現在の表記状況は下記の状態なのですが、どうしたら
333
+ 「ビートルズがやってきたヤァヤァヤァ!」の記事部分を2段にできるでしょうか?
334
+ アドバイスいただければ幸いです。