- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我刚刚在使用 ExtJS 框架的 IE6 中遇到显示故障。 - 希望有人能指出我正确的方向。
在以下示例中,面板的 bbar 在 IE6 中显示为比它附加到的面板窄 2ems(左对齐),而在 Firefox 中它显示为与面板相同的宽度。
谁能建议如何解决这个问题?
我似乎可以通过指定以 em 为单位的面板宽度或以像素为单位的填充来解决这个问题,但我认为它应该会像我下面的那样工作。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css"/>
<script type="text/javascript" src="ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-all-debug.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
var main = new Ext.Panel({
renderTo: 'content',
bodyStyle: 'padding: 1em;',
width: 500,
html: "Alignment issue in IE - The bbar's width is 2ems less than the main panel in IE6.",
bbar: [
"->",
{id: "continue", text: 'Continue'}
]
});
});
</script>
</head>
<body>
<div id="content"></div>
</body>
</html>
最佳答案
问题来自自定义 bodyStyle 填充。它使面板内容变大,但不会增大工具栏。
一种可能的解决方案是进一步嵌套一个 Ext 面板,例如:
var main = new Ext.Panel({
renderTo: 'content',
width: 500,
items: {
bodyStyle: 'padding: 1em;',
border: false,
html: "Now alignment is fine."
},
bbar: [
"->",
{id: "continue", text: 'Continue'}
]
});
需要 border: false 来避免双边框。
关于javascript - IE 6 中 Ext.Panel bbar 的宽度问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/90181/
我在面板中有一个按钮,该按钮在窗口内呈现。我希望能够将该按钮添加到窗口的底部栏。 目前我正在尝试向面板添加一个 onRender 函数以获取父窗口使用this.findParentByType('Ex
我刚刚在使用 ExtJS 框架的 IE6 中遇到显示故障。 - 希望有人能指出我正确的方向。 在以下示例中,面板的 bbar 在 IE6 中显示为比它附加到的面板窄 2ems(左对齐),而在 Fire
我对R非常陌生,目前正在尝试创建Siber椭圆。 我观看了使用省略号比较社区成员的potcast :( http://www.tcd.ie/Zoology/research/research/theo
首先我要说的是,我对 swift 和 ios 开发非常陌生。就像 1 周新的一样! 我想要实现的是在用户登录后将应用程序导航到选项卡栏 Controller ,就像您第一次登录 Tinder 时发生的
我是一名优秀的程序员,十分优秀!