Ask questions and get good answers on jQuery

On the site we are building you get a fixed height of 278px on containers where the content is higher than this 278px. Is the content lower than the container doesn't get a fixed 278px height.

The thing is we don't want a fixed height. How can we disable it, or did we get this problem because we build our own containers with different size?

Your sincerely,

John

asked Jan 06 '10 at 10:52

John's gravatar image

John
112


If you don't set a height in the metadata parameter than the container will get the size from the content; otherwise, if you set a height it must be an int and it will be get as px and not as percentage. Anyway I notice that there's a bug that should be fixed for next release...

answered Jan 07 '10 at 23:01

Matteo%20Bicocchi's gravatar image

Matteo Bicocchi ♦♦
1776129

I want dynamic height of the inserted content, so I don't add any height to the mbcontainer.

After testing on different systems the height of the mbcontainer gets the height of the available size of the browser. So when you have full-screen you get for example height 800px en when you have a small resized window open you can get 10px. Below is an example of what I did and got as response.

HTML code:

Result:

(Jan 18 '10 at 14:25) John
1

The problem is related to this part of the javascript mbContainer.js on row 131 var nwh=$(window).height(); if (container.outerHeight()>nwh) container.find(".c:first , .mbcontainercontent:first").css("height",(nwh-20)-container.find(".n:first").outerHeight()-(container.find(".s:first").outerHeight()));

(Jan 18 '10 at 15:10) John

Did you ever find a solution to this? I am having a similar problem where I have containers with dynamic data and the height is not specified. Any container that happens to be taller than the parent div will cause the container to move to the bottom right of the screen. I am setting "position:relative" on the container as I want it to exist inside the middle content div. Is it even recommended to use this way?

answered Dec 01 '10 at 15:46

jriell's gravatar image

jriell
(suspended)

Your answer
toggle preview

jQuery main site - Matteo Bicocchi