height

Owl Carousel 2 - autoHeight (multiple items)

好久不见. 提交于 2019-12-05 12:53:14
At the moment the Owl Carousel autoHeight works only with 1 item on screen. Their plan is to calculate all visible items and change height according to highest item. I work around this problem by calling the .active classes on the visible items, and give the invisible items a small height. Is there already a more elegant solution? $('.owl-carousel').owlCarousel({ loop: true, items: 3, margin: 1, autoHeight: true, }); Fiddle Any Ideas? Thanks! Dennis Helfensteller I solved it via the internal API using several events calling the same autoHeight-function. Fiddle The jQuery-Part: $('.owl-carousel

Get image size with Jquery

自作多情 提交于 2019-12-05 12:47:16
I have a list of images <img src="001.jpg"> <img src="002.jpg"> <img src="003.jpg"> <img src="004.jpg"> <img src="005.jpg"> Each image is 200px wide but the heights are different. Is there a way with Jquery to find, and then set the height of each image after they load? I plan on having dozens of images on a single page and don't want to add the width and height attribute to every single image tag. I am using the Masonry Plugin and it requires a width and height attribute for images. I believe this will do what you want: $('img').each(function() { $(this).attr('height',$(this).height()); $

Timeline page app height stuck at 800px

淺唱寂寞╮ 提交于 2019-12-05 10:27:57
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: 810, height: 910})"> <div id="fb-root"></div> <script> (function () { var e = document.createElement(

use both height and min height, and both in percent

情到浓时终转凉″ 提交于 2019-12-05 10:14:40
Is there a way to set min-height based on percent in CSS ? when I have used both height and min-height, I can't use both in percent I'm looking for a way to control min-height because my content is based on percent and the height of it changed. I can't set the height to auto, because I need the height to be 100% and min-height is also based on percent. that is the design of page, It shoud be full screen , until the minimun-height, but in a range of 1400 to 1100 the page is responsive and get smaller by percent, and I wanna keep those ratio, I mean height 100% until the minimun specific height,

CSS 100% height + header with static height;

倖福魔咒の 提交于 2019-12-05 07:11:32
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_frames_v2_fullheight/ - it works fine if you have content that pushes down eventually but with a SWF

UITextView height to change dynamically when typing / without using storyboards

柔情痞子 提交于 2019-12-05 06:35:28
问题 I have this UITextView & I want it's height to change dynamically when the user is typing on it. I want to do it programmatically. I have the UITextView above another UIView. The constraints are set as below: addtextview.leadingAnchor.constraint(equalTo: addtasktextview.leadingAnchor, constant: 8).isActive = true addtextview.trailingAnchor.constraint(equalTo: addtasktextview.trailingAnchor, constant: -8).isActive = true addtextview.topAnchor.constraint(equalTo: addtasktextview.topAnchor,

recalculate element height in jQuery after class change

五迷三道 提交于 2019-12-05 06:01:16
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 returns the initial height on both calls. I'm guessing I need to trigger something else. A lot of times, dom

jquery set height AFTER load

青春壹個敷衍的年華 提交于 2019-12-05 06:00:22
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 in css only, but as soon as I scroll the page, the color scrolls up (100% seems to only set 100% of the

UIWebview resize height to fit content

烈酒焚心 提交于 2019-12-05 04:59:10
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 different! I am wondering if the code works but when the segue finishes it's crossfade, flip or whatever

Setting body height to 100%

痞子三分冷 提交于 2019-12-05 03:30:09
I need to have the body of all my webpages (except homepage) located on http://www.zorglegal.nl to the same height (100% browser height), so the brown bar on the right is stretched full screen from top to bottom. How can I best achieve this? html{ height: 100%; } body{ min-height: 100%; } doesn't work. I also tried to set a class for the content element and tried to set it to 100% height but that doesn't work either. How can i do this? The brown bar is a png image and is set as a background image for a fullwidth container. So if that container is 100% high, it should work. But how? You can use