height

How does css position impact element width/height?

删除回忆录丶 提交于 2019-12-07 07:13:15
问题 How do the various options for css position (static, relative, absolute, fixed) impact the way percentage width/height is calculated? This question may be too generic to provide a concrete answer, and it's possible that the answer is "the two are not directly related", but I'm having trouble understanding the impacts of css position on element size. Links to related questions/answers are welcome. 回答1: I recommend that you read A List Apart's CSS Positioning article. It's the best article I've

Timeline page app height stuck at 800px

柔情痞子 提交于 2019-12-07 04:14:29
问题 I'm developing an app for a Facebook page with the 'timeline' layout, and I want the height of the app to scale with the content, but the height of the app is fixed at 800px. The current app settings show that the height is set to 'fluid,' but I have also tried fixing the height to random values and witnessed no change. How to I get the height of my app to scale to it's content? Thanks for any responses. Update: So appending this to my body tag worked. <body onload="FB.Canvas.setSize({width:

jQuery height() not changing on resize

删除回忆录丶 提交于 2019-12-07 03:30:47
问题 I never had this problem before but I can't seem to find the solution, so I hope you guys can help me out. jQuery function setTheHeight() { if( $('#main.level1 .block.attention .block-content').length ) { //Get value of highest element var maxHeight = Math.max.apply(Math, $('#main.level1 .block.attention .block-content').map ( function() { return $(this).height(); } )); console.log(maxHeight); $('#main.level1 .block.attention .block-content').height(maxHeight); } } setTheHeight(); $(window)

CSS 100% height + header with static height;

て烟熏妆下的殇ゞ 提交于 2019-12-07 03:10:28
问题 I am building a layout which includes a header, which is 40 px in height. Underneath this header a SWF resides that should take up the rest of the available space. The best solution untill now has been working with a table, giving the first row 40px height and the second row a 100% height - but these rows still add up in Internet Explorer, resulting in a scrollbar appearing for 40 extra pixels - which should not be the case. I tried using this: http://www.456bereastreet.com/archive/200609/css

recalculate element height in jQuery after class change

只愿长相守 提交于 2019-12-07 02:17:38
问题 I've got a list of items and according to a criteria it gets a class via jQuery on document.ready that triggers CSS3 columns. If the list is displayed in columns it would have a smaller height. Is there any way to get the new height in jQuery immediately after the class change? $items.each(function(i){ var theItem = this; console.log($(theItem).height()); //extended layout if ( theCriteria ) { $(theItem).addClass('extended'); console.log('after', $(theItem).height()); } } The code above

jquery set height AFTER load

微笑、不失礼 提交于 2019-12-07 01:50:43
问题 I am having a little trouble setting the height of an element that I am loading in dynamically. I use the jquery load function to load an external (dynamic) page into a div (#cbox) on my current page. Because this sub-page is dynamic, I can't know before-hand what the height of the content is. I want to get the height once content is loaded and set the height of the container div to match so that my color background css goes all the way down. I have tried many variations of 100% height divs

UIWebview resize height to fit content

天涯浪子 提交于 2019-12-07 01:03:05
问题 I know this has been asked many times but I can not get it to work. In short my UIWebview pulls in some HTML which has a none fixed height (width always the same), I just want the height to change accordingly. I have tried a number of fixes I have found online but my problem is the webview will change to the correct size but only for a brief second and then in flicks back to the original size. I should point out that my this view is invoked by a segue, that is the only thing I can think is

JTable change the row height dynamically [duplicate]

纵饮孤独 提交于 2019-12-06 23:26:27
问题 This question already has answers here : Auto adjust the height of rows in a JTable (3 answers) Closed 6 years ago . i am having trouble changing the height of the my rows dynamically, is there a method i need to overload? --Edit-- Sorry for the short post it was my first ....My problems was really to do with changing the row height depending on the content. So what i have done so far is made a inner class that implements TabelCellRenderer. This is what i am doing at the moment for my row

jQuery outer height is zero?

痞子三分冷 提交于 2019-12-06 20:41:48
问题 Why is the height of my search form 0? It's at least 20px high. jQuery(function($) { // Document ready var s_height = $("#search_form").outerHeight(); // Height of searchform alert(s_height) // 0 回答1: With jQuery you can only get the height of an element if it is visible. So make sure that it is visible at the time that your JS runs, or use one of the several workarounds if you need it to be hidden at the time. As you mentioned in your comments, the div was hidden and then fading in. 回答2: If

what is the jQuery outerHeight() equivalent in YUI

独自空忆成欢 提交于 2019-12-06 19:50:41
问题 In jQuery, I can very easily get the current computed height for an element that includes padding, border, and optionally margin by using outerHeight()... // returns height of element + border + padding + margin $('.my-element').outerHeight(true); How would I do this in YUI? I'm currently using version 2.8.1 . Similar to this question, I can always do getComputedStyle() for height, border, padding, and margin, but that is a lot of manual labor which includes parsing the return values and