如何给这个表边界半径?

How do I give this table a border radius of 5px? The css is in the code with the php ajax file.

<table border=';
$form_questions_list.='2px align=';
$form_questions_list.='center>

I've never seen CSS used this way. Can you tell me how to adjust this?

Here is the full function code:

// AJAX function to load updated survey question List
add_action('wp_ajax_nopriv_show_updated_question_list', 'show_updated_question_list');
add_action('wp_ajax_show_updated_question_list', 'show_updated_question_list');
function show_updated_question_list(){

global $wpdb;
$available_questions = $wpdb->get_results("SELECT question_ID, question_text FROM dm_form_questions");
$form_questions_list = '';

$form_questions_list.='<h1>Add your review questions here:</h1>
<table border=';
$form_questions_list.='2px align=';
$form_questions_list.='center>
<th style="background-color: #333; color: #FFF; font-size: 15px">Question Text</th>
<th style="background-color: #AFA; font-size: 15px">Edit</th>
<th style="background-color: #FAA; font-size: 15px">Delete</th>';
foreach ($available_questions as $key) {
    $form_questions_list.='<tr><td  style="text-align: left; width: 500px; padding: 0 5px;">'.$key->question_text.'</td><td><input type=';
    $form_questions_list.= 'button value=';
    $form_questions_list.='Edit id=';
    $form_questions_list.=$key->question_ID;
    $form_questions_list.=' onclick=';
    $form_questions_list.='edit_question_text(';
    $form_questions_list.=$key->question_ID;
    $form_questions_list.=') ></td>';
    $form_questions_list.='<td><input type=';
    $form_questions_list.= 'button value=';
    $form_questions_list.='Delete id=';
    $form_questions_list.=$key->question_ID;
    $form_questions_list.=' onclick=';
    $form_questions_list.='delete_question_text(';
    $form_questions_list.=$key->question_ID;
    $form_questions_list.=')></td>';
    $form_questions_list.='</tr>';
    }

    $form_questions_list.='</table>';
    echo $form_questions_list;
    die();

}

Thanks!

Try to add a id to the table.

For example:

echo "<table id=\"info_table\" border=2>";

Then add this CSS code to the head of you HTML document, or use it externally using a CSS file.

Code:

<style type="text/css"> 
  #info_table {
    Code: whatever;
  }
</style>

This allows you to style the table using CSS with a combination of PHP.

Let me know if this helped !

I don't see any CSS being used in this code. It's just table element properties: All you should have to do is add a style to the table.

<table style='border-radius: 5px;' border=';
$form_questions_list.='2px align=';
$form_questions_list.='center>