我在使用 TinyMCE 和 twitter bootstrap 时遇到问题:这是我的问题,侧边栏和内容已经脱离了内联。这是截图: http: //puu.sh/GOhR
该页面的代码:
<?php
//create_cat.php
include 'connect.php';
include 'header.php';
$sql = "SELECT
topic_id,
topic_subject
FROM
topics
WHERE
topics.topic_id = " . mysql_real_escape_string($_GET['id']);
$result = mysql_query($sql);
if(!$result)
{
echo 'The topic could not be displayed, please try again later.';
}
else
{
if(mysql_num_rows($result) == 0)
{
echo 'This topic doesn′t exist.';
}
else
{
while($row = mysql_fetch_assoc($result))
{
//display post data
echo '<table border="1" class="table table-bordered table-striped"
style="float: right; width: 990px;">
<tr>
<th colspan="2">' . $row
['topic_subject'] . '</th>
</tr>';
//fetch the posts from the database
$posts_sql = "SELECT
posts.post_topic,
posts.post_content,
posts.post_date,
posts.post_by,
users.user_id,
users.user_name
FROM
posts
LEFT JOIN
users
ON
posts.post_by = users.user_id
WHERE
posts.post_topic = " .
mysql_real_escape_string($_GET['id']);
$posts_result = mysql_query($posts_sql);
if(!$posts_result)
{
echo '<tr><td>The posts could not be displayed, please try
again later.</tr></td></table>';
}
else
{
while($posts_row = mysql_fetch_assoc($posts_result))
{
echo '<tr class="topic-post">
<td class="user-post">' .
$posts_row['user_name'] . '<br/>' . date('d-m-Y H:i', strtotime($posts_row
['post_date'])) . '</td>
<td class="post-content">' .
$posts_row['post_content'] . '</td>
</tr>';
}
}
if(!$_SESSION['signed_in'])
{
echo '<tr><td colspan=2>You must be <a
href="signin.php">signed in</a> to reply. You can also <a href="signup.php">sign up</
a>
for an account.';
}
else
{
//show reply box
echo '<tr width="640px;" style="width: 10px;"><td
colspan="2"><h2>Reply:</h2><br />
<form method="post" action="reply.php?id=' . $row
['topic_id'] . '" style="width: 100%; margin-left: 100px;">
<textarea name="reply-content" name="elm1"
rows="15" cols="80" style="width: 80%; margin-left: 100px; float: right;"></
textarea><br /><br />
<input type="submit" value="Submit
reply" / >
</form></td></tr>';
}
//finish the table
echo '</table>';
}
}
}
?>
header.php 中的 TinyMCE:
<script type="text/javascript" src="js/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins :
"autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespel
l,in
linepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,direction
alit
y,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,
auto
save,visualblocks",
// Theme options
theme_advanced_buttons1 :
"save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,jus
tifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 :
"cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,inden
t,blo
ckquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttim
e,pr
eview,|,forecolor,backcolor",
theme_advanced_buttons3 :
"tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,a
dvhr
,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 :
"insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins
,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft,visualblocks",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Example content CSS (should be your site CSS)
content_css : "css/content.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "lists/template_list.js",
external_link_list_url : "lists/link_list.js",
external_image_list_url : "lists/image_list.js",
media_external_list_url : "lists/media_list.js",
// Style formats
style_formats : [
{title : 'Bold text', inline : 'b'},
{title : 'Red text', inline : 'span', styles : {color :
'#ff0000'}},
{title : 'Red header', block : 'h1', styles : {color : '#ff0000'}},
{title : 'Example 1', inline : 'span', classes : 'example1'},
{title : 'Example 2', inline : 'span', classes : 'example2'},
{title : 'Table styles'},
{title : 'Table row 1', selector : 'tr', classes : 'tablerow1'}
],
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
</script>
有人可以告诉我如何修复它或向我提供要输入的代码或类似的东西