height

jQuery sortable item height

£可爱£侵袭症+ 提交于 2019-12-03 10:38:52
问题 I've got a simple jQuery sortable based on a list as follows: <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul> I've created a helper function so that regardless of what the contents of an item may be, the helper is always the same fixed size. My problem is that if I drag an item that has a lot of content (says several paragraphs of text), even though my helper is only a single line in height, the item will not drop onto the item below until it has travelled at least

get height for a div with overflow:auto;

不问归期 提交于 2019-12-03 10:30:53
i have a div with height:100px and overflow:auto the content is dynamic. i want scroll the div in the bottom i tried with $("#chat_content").scrollTop($("#chat_content").height()); but if the content is bigger than 100px $("#chat_content").height() returns 100 and the div isn't scrolled on the bottom how can i do? thanks Get the scrollHeight property from the underlying DOM element: $("#chat_content").scrollTop($("#chat_content").get(0).scrollHeight); try $("#chat_content").scrollTop($("#chat_content").get(0).scrollHeight); Another way is to just wrap the internal content in a div and then

Set div to fill in the rest of the height dynamically?

≯℡__Kan透↙ 提交于 2019-12-03 10:05:48
问题 So. My code is something along the lines of <html> <body> <div id="header" style="width:100%;min-height:0;display:block;background-color:#000"> <img src="header_image.svg" /> </div> <div id="content" style"display:block"> Some content </div> </body> </html> I have an svg in the header that I have set so that it matches the width of the window and the height scales to preserve the svg. Then I have the rest of the page in another div. I would like it so that the page doesn't scroll and this

When child divs are floated, parent divs lose auto-height

天涯浪子 提交于 2019-12-03 09:50:53
I have a parent div called main. It has a bunch of child divs in it, which I floated left or right. When I finished floating the last one, the height of the main div completely vanished, throwing off the layout of my page. I gave it a height:100%; just for now, but it will be overly tall on most resolutions. How can I keep it at a fluid height, only as much as needed to contain the elements? Contain your floats. On the div called main add overflow:hidden; . That should contain it. Are you using relative positioning for your floats? You'll need to put a fake div in to "hold open" the parent div

UITableView section header height for non-grouped table

醉酒当歌 提交于 2019-12-03 09:47:24
Greetings! I know that UITableView sectionHeaderHeight is only used for grouped tables, but I'll ask anyway (in case there's some way to do this that isn't obvious) ... Is there a way to change the section header height (and with it, the font/size) for a NON -grouped table? Hoping "yes" or at least a "maybe" ... but fearing it might be a "no". Have at it, folks. Yes. Use this delegate method: - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 44; } Of course, change as appropriate. There's of course the one for footer as well: - (CGFloat

Two DIVs inside DIV. How to auto-fill the space of parent DIV by second DIV?

跟風遠走 提交于 2019-12-03 09:26:47
问题 Please visit this fiddle to see what I mean - I have a parent DIV, within that there are two DIVs placed in vertical order. The top DIV should have only the height of its content, whereas the bottom DIV should occupy all remain space of the parent DIV irrespective to content heights, and also shouldn't overlap the parent DIV. HTML: <div class="outer"> <div class="inner-title"> THIS IS MY TITLE </div> <div class="inner-content"> CONTENT AREA </div> </div> CSS: html,body { height: 100%; }

Change height of textarea based on number of lines of text in javascript [duplicate]

旧巷老猫 提交于 2019-12-03 08:59:30
This question already has answers here : How to autosize a textarea using Prototype? (18 answers) Possible Duplicate: Autosizing textarea using prototype How do I change the height of a text area based on the number of lines of text that the user puts into it? For the example below if the user changed the text in the textarea to more than one line of text then the textarea would put a scroll bar on itself rather than changing its height to fit the number of lines. <textarea> This is the default text that will be displayed in the browser. When you change this text and add more lines to it the

Equal height columns in jQuery

夙愿已清 提交于 2019-12-03 08:58:15
Hi I am looking for a jQuery based equal height columns. I know there are a lot of them floating around but my requirement is a bit different . I want to use these in a Mega Menu where thee are about 4-5 drop-downs and each drop-down has 3-4 columns. I want all these 3-4 columns of equal height but not in all drop-downs, because the columns height will be different in the other drop-down depending on the content of that section. I found a solution in MooTools which works perfect for my requirement. The MooTools code below makes all the columns in a particular div equal to it's parent div's

How to change height of iframe based on dynamic conent within the iframe?

最后都变了- 提交于 2019-12-03 08:46:23
问题 I have an iframe that has dynamic content. If the answers specific questions, additional information displays (hidden div becomes visible). I'd like the height of the iframe to expand. I know this question has been asked on here multiple times, but it seems like it is typically when a different page within the iframe is loaded, not when content is changed dynamically within the iframe. Here is an example I tried to put together using jsFiddle: iframe: http://jsfiddle.net/B4AKc/2/ page: http:/

How to keep panel height fixed with scroll if content overflow for JQuery Mobile

无人久伴 提交于 2019-12-03 08:02:58
I have a page with fixed header and a fixed footer. The height of the content is also fixed to the height of the window. The document has a panel whose content may grow longer than the height of window/content. When that happens the height of the document gets changed. But I need to keep the height of the document fixed without scrollbars. The panel should get the scrollbar instead. Example: http://jsfiddle.net/moizhb/GSSD3/ Here is how panel is instantiated: <div data-role="panel" id="navpanel" data-theme="a" data-display="overlay"></div> I'd appreciate any directions here. Thank you! Here is