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

質問編集履歴

3

変更

2020/03/02 02:48

投稿

yuki911
yuki911

スコア27

title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,4 @@
1
- formの上部に余白ができているので、それを消したいのでアドバイスお願いします
1
+ formの上部に余白ができてい、それを消したいのでアドバイスお願いします
2
2
  ```html
3
3
  <!DOCTYPE html>
4
4
  <html lang="ja">

2

変更

2020/03/02 02:48

投稿

yuki911
yuki911

スコア27

title CHANGED
@@ -1,1 +1,1 @@
1
- flexbox高さ合わない
1
+ form上部に余白できる
body CHANGED
@@ -1,4 +1,4 @@
1
- 親要素に対してbuttonの上に余白がるのですがこれを消すにはどうしたでしょうか?
1
+ formの上に余白ができているので、それを消したいアドバイスお願います
2
2
  ```html
3
3
  <!DOCTYPE html>
4
4
  <html lang="ja">

1

変更

2020/03/02 02:38

投稿

yuki911
yuki911

スコア27

title CHANGED
File without changes
body CHANGED
@@ -9,11 +9,6 @@
9
9
  <h1>掲示板へようこそ</h1>
10
10
  </head>
11
11
  <body>
12
- <?php if(isset($error)): ?>
13
- <?php foreach($error as $e): ?>
14
- <p class="error"><?php echo h($e); ?></p>
15
- <?php endforeach; ?>
16
- <?php endif; ?>
17
12
  <section>
18
13
  <h2>新規投稿</h2>
19
14
  <!-- 書き込み用フォーム -->
@@ -21,35 +16,28 @@
21
16
  <label for="title">タイトル</label><br>
22
17
  <input type="text" name="title" id="title"><br>
23
18
  <button type="submit">部屋を立てる</button>
24
- <input type="hidden" name="token" value="<?php echo h(generate_token()); ?>">
19
+ <input type="hidden" name="token" value="">
25
20
  </form>
26
21
  </section>
27
22
  <section>
28
23
  <h2>投稿一覧</h2>
29
- <p>現在の投稿は<span><?php echo $count; ?></span>件です</p>
24
+ <p>現在の投稿は<span></span>件です</p>
30
- <?php if(isset($count)): ?>
31
- <?php foreach($rows as $row): ?>
32
25
  <div class="container">
33
26
  <div class="linkbox">
34
- <a href='threads.php?boards_id=<?php echo $row['boards_id']; ?>'>
27
+ <a href='threads.php?boards_id=?>'>
35
- <?php echo h($username); ?>
28
+
36
- <?php echo h($row['created_at']); ?> <br>
37
- <?php echo h($row['title']); ?>
38
29
  </a>
39
30
  </div>
40
31
  <div class="button">
41
32
  <form action="change.php" method="get">
42
- <button type="submit" name="boards_id" value="<?php echo h($row['boards_id']); ?>">編集</button>
33
+ <button type="submit" name="boards_id">編集</button>
43
34
  </form>
44
35
  <form action="delete.php" method="get">
45
- <button type="submit" name="boards_id" value="<?php echo h($row['boards_id']); ?>">削除</button>
36
+ <button type="submit" name="boards_id">削除</button>
46
37
  </form>
47
38
  </div>
48
39
  </div>
49
- <?php endforeach; ?>
50
- <?php else: ?>
51
40
  <p>投稿はまだありません。</p>
52
- <?php endif; ?>
53
41
  </section>
54
42
  </body>
55
43
  </html>
@@ -99,4 +87,4 @@
99
87
  }
100
88
 
101
89
  ```
102
- ![イメージ説明](cd95131bb81889a32ef351047a708c9f.png)
90
+ ![イメージ説明](26422357e3b8615cfe062aab31b4a271.png)