0

I have a div, not specified any size inside CSS. Size grows with content using display: inline-block. Using width, outerWidth ignores the content size and returns zero. No need for an example, nothing special except I load my content with ajax $.load.

Content is definitely loaded before using width. Somebody with a hint?

Kindle Q
  • 944
  • 2
  • 19
  • 28
MR.ABC
  • 4,712
  • 13
  • 44
  • 88
  • Can you provide an example recreating the problem so we can try to help you? – 3dgoo Jun 13 '13 at 04:29
  • Here is a simple example showing `outerWidth` working on an `inline-block` item: http://jsfiddle.net/G4wEh/ – 3dgoo Jun 13 '13 at 04:30
  • 1
    "No need for an example"? I think we need an example. – musicnothing Jun 13 '13 at 05:08
  • Maybe this is the problem: http://stackoverflow.com/questions/9016307/force-reflow-in-css-transitions-in-bootstrap – Tauri28 Jun 13 '13 at 06:49
  • I don't understand your question, it would be better if you give an example. Try using `min-width`,`max-width` properties. you can also try `width:auto;` – Arun Jun 13 '13 at 05:19

0 Answers0