Matt Ridge Posted November 9, 2011 Share Posted November 9, 2011 Here is the code. Yes it probably is messy but I'll fix it if I need to. What I am trying to do is this, lets take the first output field. The output shows: Added by: #Name It works, I'm happy, but what I need to do is to make it so that the Added By is bolded. Is this possible the way I have it written to do it in CSS or did I just accidently post this in the wrong section? Here is what I have now: http://kaboomlabs.com/PDI/@dm!n/viewncmr.php?id=2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PDI NCMR - View</title> <link rel="stylesheet" type="text/css" href="../CSS/admin.css" /> </head> <body> <div id="logo"> <img src="../images/PDI_Logo_2.1.gif" alt="PDI Logo" /> </div> <?php require_once('../connectvars.php'); // Connect to the database $dbc = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); // Grab the profile data from the database if (!isset($_GET['id'])) { $query = "SELECT * FROM ncmr WHERE id = '$id'"; } else { $query = "SELECT * FROM ncmr WHERE id = '" . $_GET['id'] . "'"; } $data = mysqli_query($dbc, $query); if (mysqli_num_rows($data) == 1) { // The user row was found so display the user data $row = mysqli_fetch_array($data); echo'<h3 id="NCMR2">Non-Conforming Materials Report (NCMR: ' . $row['NCMR_ID'] . ')</h3>'; echo '<form id="all">'; echo '<fieldset>'; if (!empty($row['Added_By'])) { echo '<div id="ab"><tr><td>Added By: </td><td>' . $row['Added_By'] . '</td></tr></div>';} if (!empty($row['Added_By_Date'])) { echo '<div id="abd"><tr><td>On: </td><td>' . $row['Added_By_Date'] . '</td></tr></div>';} echo '<div id="box">'; echo '<div id="box1">'; if (!empty($row['Nexx_Part'])) { echo '<div id=""><tr><td>Nexx Part: </td><td>' . $row['Nexx_Part'] . '</td></tr></div><br />';} if (!empty($row['Nexx_Rev'])) { echo '<div id="Nexx_Rev"><tr><td><b>Nexx Rev: </td><td></b>' . $row['Nexx_Rev'] . '</td></tr></div>';} if (!empty($row['Nexx_Part_Description'])) { echo '<div id="Nexx_Part_Description"><tr><td>Nexx Part Description: </td><td>' . $row['Nexx_Part_Description'] . '</td></tr></div>';} if (!empty($row['NCMR_Qty'])) { echo '<div id="NCMR_Qty"><tr><td>On: </td><td>' . $row['NCMR_Qty'] . '</td></tr></div>';} echo '</div>'; echo '</div>'; echo '</fieldset>'; echo '</form>'; } // End of check for a single row of user results else { echo '<p class="error">There was a problem accessing your profile.</p>'; } mysqli_close($dbc); ?> </body> </html> Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted November 9, 2011 Share Posted November 9, 2011 you can assign a class to the added by <td> and use CSS to make the containing text bold ( font-weight: bold; ) Quote Link to comment Share on other sites More sharing options...
Matt Ridge Posted November 9, 2011 Author Share Posted November 9, 2011 you can assign a class to the added by <td> and use CSS to make the containing text bold ( font-weight: bold; ) Will have to try that again, the last time I attempted it, it didn't take. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted November 9, 2011 Share Posted November 9, 2011 if you do what I suggested and are receiving unexpected results.. post back on here and I will take a look Quote Link to comment Share on other sites More sharing options...
Matt Ridge Posted November 9, 2011 Author Share Posted November 9, 2011 Just tried, and it didn't take. same link, the SN has the class attached to it, and the CSS shows the .b class as bold... no take, this is what happened last time too... any idea? Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted November 9, 2011 Share Posted November 9, 2011 just looked at your site and inspected the DOM.. what the heck is this? <class="b">SN: <br>164</class="b"> class is not a valid tag element.. you will need to use something like a span.. <span class='b'></span> Quote Link to comment Share on other sites More sharing options...
Matt Ridge Posted November 9, 2011 Author Share Posted November 9, 2011 just looked at your site and inspected the DOM.. what the heck is this? <class="b">SN: <br>164</class="b"> class is not a valid tag element.. you will need to use something like a span.. <span class='b'></span> Sorry, lack of sleep kills brain cells at times. Working of off 3 hrs of sleep... in any case that worked, thanks a lot, it's good to know that I can get help for the simple things here as well as the complex. Quote Link to comment Share on other sites More sharing options...
AyKay47 Posted November 9, 2011 Share Posted November 9, 2011 can't say I've ever seen someone try and use class as an element.. heh, happens to us all.. glad I could help Quote Link to comment Share on other sites More sharing options...
Matt Ridge Posted November 9, 2011 Author Share Posted November 9, 2011 can't say I've ever seen someone try and use class as an element.. heh, happens to us all.. glad I could help Trust me I'll do things most people will never try I'm the bend the rules type of guy sometimes, so thanks for the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.