cck模組的提交頁面上的頁面元素希望能控制其排列
現在通過以下幾個文件來達到
template.php
if ((arg(0) == 'node') && (arg(1) == 'add') && (arg(2) == 'xxx')){
function phptemplate_node_form($form) {
return _phptemplate_callback('content_daily_edit', array('user' => $user, 'form' => $form));
}
}content_xxx_edit.tpl.php
<span id="jpj0a"><?php print drupal_render($form['field_advice']); ?></span>
<span id="jpj1a"><?php print drupal_render($form['group_1']); ?></span>
<span id="jpj1b"><?php print drupal_render($form['group_1']['field_data']); ?></span>
<span id="jpj1c"><?php print drupal_render($form['group_1']['field_datachange']); ?></span>
<span id="jpj2a"><?php print drupal_render($form['group_2']); ?></span>style.css
#jpj0a{
width: 100%;
float:left;
}
#edit-field-advice-0-value {
width: 98%;
float: left;
}
#jpj1a, #jpj1b {
float: left;
}我的問題是:
有什麽div/class和css設置可確保頁面元素在新行中出現
Re: css如何確保textfield(或其他頁面元素)顯示在新行
拿掉 float: left;
Re:
頁面元素會排列到前面一行是因為前面一行有float: left; 拿掉果然好了, 謝謝charlesc!