georgewoofbates
georgewoofbates

Reputation: 330

Bold text in a table when I didn't tell it to be

I have this really weird issue. When ever I run this page on my server the text of the table comes out bold when I haven't told it anywhere to be bold. The buttons that say Logout and back at the top come out without bold but the whole table is bold. Its really annoying me now! Please help!

<head>


<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<title>RHS Year 13 - Administration</title>

<link href="style_ric.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="header"> <img src="header.jpg" width="260px" height="50"/>
</div>
<h1>Administration Panel
</h1>
<p class="form"><a href="users.php?logout=yes">Logout</a> - <a href="view.php">Back</a></p>
<h1>
  <hr />



<?php

include_once 'database_login.php'; 


if (isset($_GET["page"])) { $page  = $_GET["page"]; } else { $page=1; }; 
$start_from = ($page-1) * 20; 
$sql = "SELECT * FROM login ORDER BY last_name ASC LIMIT $start_from, 20"; 
$rs_result = mysqli_query ($con, $sql); 

echo '</p>';
echo '<table border="0" class="form">';
echo '<tr><td>Student ID</td><td>Last Name</td><td>First Name</td><td>Form Class</td></tr>';

while ($row = mysqli_fetch_assoc($rs_result)) { 

            echo '<tr>';
            echo '<td>' . $row["student_id"] . '</td>';
            echo '<td>' . $row["last_name"] . '</td>';
            echo '<td>' . $row["first_name"] . '</td>';
            echo '<td>' . $row["form_class"] . '</td>';
            echo '</tr>';
}; 
echo '</table>';

$sql = "SELECT COUNT(last_name) FROM login"; 
$rs_result = mysqli_query($con, $sql); 
$row = mysqli_fetch_row($rs_result); 
$total_records = $row[0]; 
$total_pages = ceil($total_records / 20); 

  echo '<p class="form">';
for ($i=1; $i<=$total_pages; $i++) { 
              echo '<a href="users.php?page=' . $i . '">' . $i . '</a>'; 
}; 

echo '</p>';
?>

</body>
</html>

Stylesheet:

@charset "UTF-8";
/* CSS Document */

p {
    font-size:12px;
    color:#000;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
}

h2 {
    font-size:12px;
    color:#000;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    font-weight:bold;
}

h1 {
    font-weight:bold;
    font-size:16px;
    font-family: Arial, Helvetica, sans-serif;
}

.form {
    font-size:12px;
    color:#000;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;


}

.nopadding {
    padding: 0px;
    margin-bottom: 0px;
}

.italics_note {
    font-size:12px;
    color:#000;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
    font-style:italic;
}

.error {
    font-size:12px;
    color:#ffffff;
    background-color:#F00;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
}

.done {
    font-size:12px;
    color:#ffffff;
    background-color:#060;
    padding:0;
    font-family: Arial, Helvetica, sans-serif;
}

#header {
    width:auto;
    height:50px;
    background-color:#020154;
    color: #000000;
}

#error {
    width:200px;
    height:14px;
    padding:1px;
    background-color:#F00;
    color: #000000;
}

Upvotes: 0

Views: 237

Answers (1)

Anurag Ramdasan
Anurag Ramdasan

Reputation: 4340

You opened a <h1> tag which you didn't close. Since your logout button is before the <h1> tag it appears normal. And the bold attribute of your <h1> gets applied to all other elements.

Upvotes: 5

Related Questions