django
django

Reputation: 2909

Absolute div width inside relative div

I am having problem with html/css.

  1. I have a container (position: relative;) , in my case it is div.jtk-demo-canvas
  2. Container has floating divs (position: absolute;) inside, in my case these are div.jtk-window
  3. floating divs should have (position: absolute;) as it is requirement for js plugin

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.

But as You can see in my case last div from right is same as 2nd one but its width is lesser.

How can I Fix this ?

jsfiddle: https://jsfiddle.net/bababalcksheep/wm94sf2b/ Since I have large html code, therefore I am posting fiddle link.

enter image description here

Upvotes: 1

Views: 176

Answers (2)

Abhi
Abhi

Reputation: 4261

Try display: inline-table and position: relative to div with id 117a13213-102 (Checked in Chrome and Firefox)

FIDDLE

CODE

<div style="left: 800px; top: 105px; display: inline-table; position: relative;" id="117a13213-102" class="flowBox jtk-window">

Upvotes: 1

CodeWeis
CodeWeis

Reputation: 856

because you gave him left:800px; and your body is width: 960px; for that your 3rd div only have 160px place

Upvotes: 2

Related Questions