[英]Absolute div width inside relative div
I am having problem with html/css. 我有html / css的问题。
position: relative;
) , in my case it is div.jtk-demo-canvas
position: relative;
),在我的例子中是div.jtk-demo-canvas
position: absolute;
) inside, in my case these are div.jtk-window
position: absolute;
),在我的例子中这些是div.jtk-window
position: absolute;
) as it is requirement for js plugin position: absolute;
),因为它是js插件的要求 Requirement: Floating divs should have min-width of 200 and max-width of 400. I dont want to apply width to it as it should vary between 200-400 to fit its content. 要求:浮动div应该具有最小宽度200和最大宽度400.我不想应用宽度,因为它应该在200-400之间变化以适合其内容。
But as You can see in my case last div from right is same as 2nd one but its width is lesser. 但正如你可以看到,在我的情况下,右边的最后一个div与第二个相同但宽度较小。
How can I Fix this ? 我怎样才能解决这个问题 ?
jsfiddle: https://jsfiddle.net/bababalcksheep/wm94sf2b/ Since I have large html code, therefore I am posting fiddle link. jsfiddle: https ://jsfiddle.net/bababalcksheep/wm94sf2b/由于我有大量的HTML代码,因此我发布了小提琴链接。
because you gave him left:800px;
因为你给了他
left:800px;
and your body is width: 960px;
你的身体
width: 960px;
for that your 3rd div only have 160px place 因为你的第3个div只有160px的位置
Try display: inline-table
and position: relative
to div with id 117a13213-102 (Checked in Chrome and Firefox ) 尝试
display: inline-table
和position: relative
对于ID为117a13213-102的 div(在Chrome和Firefox中检查)
CODE 码
<div style="left: 800px; top: 105px; display: inline-table; position: relative;" id="117a13213-102" class="flowBox jtk-window">
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.