drupal的默认主题出现一些问题
drupal的默认主题会产生一些奇怪的问题。如果我创建一个包含标记的表单:
$form['markup'] = array(
'#type' => 'markup',
'#value' => '<table><tr><td> test </td></tr></table>');
浏览器显示表格,但表格的 css 样式的属性“border-collapse”设置为“collapse”。这意味着我在桌子上方看到一条小灰线,看到它不太漂亮。
解决方案之一是自己将 border-collapse 的值修复到表的属性中,但在执行此操作之前,我想确保没有任何其他解决方案可以避免这种情况。
我的问题是:drupal 的默认主题强制某些 HTML 元素(例如表格)出现一些奇怪的行为,这正常吗?
你有什么样的答案吗?
The default theme of drupal make some strange problems. If I create a form that contains a markup:
$form['markup'] = array(
'#type' => 'markup',
'#value' => '<table><tr><td> test </td></tr></table>');
The browser displays the table, however the property 'border-collapse' of the css style of the table is setted to 'collapse'. It means that I see a small grey line above my table and It's not very beautifull to see that.
One of the solution is to fix by myself the value of border-collapse into the property of the table but before doing this I wanna be sure that there isn't any other solution to avoid this.
My problem is : is it normal that the default theme of drupal force some strange behavior with some HTML element (e.g. table).
Do you have a kind of answer?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认主题设置“border-collapse”之类的东西很正常,是的。小灰线听起来不是有意的,可能是由于对表格的假设在您的表格中不正确,例如不同的
和
。您使用“force”一词听起来您可能对可以更轻松地自定义的基本主题感到更满意。
It's normal for the default theme to set something like "border-collapse", yes. The small grey line sounds unintended, perhaps from an assumption about tables that isn't true in your table, e.g. a distinct
<thead>
and<tbody>
. Your use of the word "force" sounds like you may be happier with a base theme you can more easily customize.