Jump to content

Trying to bold part of a line/formula in a Div.


Recommended Posts

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>


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>

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.

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 :) 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.