height

Calculating height using jQuery differs in Firefox and Chrome

∥☆過路亽.° 提交于 2019-12-21 16:33:47
问题 I have a question that was already asked here, but the solution offered there did not work. The problem is that I'm using the jQuery height() function to return the height of a div. It works nicely in Firefox, but returns a value that is 300px smaller in Chrome... You can see an example of this bug here. Though I must say it's in Hebrew. Though that shouldn't matter much... Has anyone had that happen before? Here's the code that calculates the height: var heightLeftCol = $('#leftCol').height(

Firefox ignores percent height on image

浪尽此生 提交于 2019-12-21 12:06:32
问题 I'm developing a Web site for a professor and I'm having an issue with my CSS in Firefox. The Web site was designed to be fluid width/height so it would fill the screen on any resolution, so because of that I'm using a lot of percentages for heights and widths. I've run into a problem with images however. http://projects.mediabounds.com/i.bradley.edu/ The top bar of thumbnails should scale the images, but it doesn't work in Firefox, the images stay 100% their original height. It works fine in

In Android, how can I set a ListView item's height and width?

孤人 提交于 2019-12-21 09:26:31
问题 I want to create an interface that has one or two listviews that ultimately span the entire screen with two rows. How can I change their height so that they take up 50% of the screen, vertically? If it's along the same lines, I'd love to know how to do this regardless of orientation. With regards to width; let us say I have two listviews, each with one row. They span the entire screen as described above. The lower listview has two clickable items within it that each take up 50% of the screen

In Android, how can I set a ListView item's height and width?

橙三吉。 提交于 2019-12-21 09:26:10
问题 I want to create an interface that has one or two listviews that ultimately span the entire screen with two rows. How can I change their height so that they take up 50% of the screen, vertically? If it's along the same lines, I'd love to know how to do this regardless of orientation. With regards to width; let us say I have two listviews, each with one row. They span the entire screen as described above. The lower listview has two clickable items within it that each take up 50% of the screen

image height using jquery in chrome problem

久未见 提交于 2019-12-21 07:34:15
问题 $('img').height() returns 0 in chrome, but it returns the actual height in IE and firefox. Whats the actual method to get the height of the image in chrome? 回答1: As Josh mentioned, if the image has not fully loaded yet, jQuery won't know what the dimensions are yet. Try something like this to ensure you're only attempting to access it's dimensions after the image has been completely loaded: var img = new Image(); $(img).load( function() { //-- you can determine the height before adding to the

Variable width & height of UICollectionViewCell using AutoLayout with Storyboard (without XIB)

本秂侑毒 提交于 2019-12-21 07:31:42
问题 Here is an design issue in the app that uses AutoLayout, UICollectionView and UICollectionViewCell that has automatically resizable width & height depending on AutoLayout constraints and its content (some text). It is a UITableView list like, with each cell that has it's own width & height calculated separately for each row dependant on its content. It is more like iOS Messages build in app (or WhatsUp). It is obvious that app should make use of func collectionView(collectionView:

can't change the height of a text field in simple_form

ぃ、小莉子 提交于 2019-12-21 07:23:58
问题 I've tried #Default size for text inputs. config.default_input_size = 10 from config/initializers/simple_form.rb I've also tried <%= f.input :message, :input_html => {:size => 10} %> But neither of these change a single thing about how my text fields appear. 回答1: You need to do this <%= f.input :message, :input_html => {:rows => 10} %> Html text area tag attributes has two attributes namely rows and cols which lets you specify the no of rows and columns(i.e. width) of your text area. If this

My content disappears when I set the HTML tag to 100% height

此生再无相见时 提交于 2019-12-21 05:33:10
问题 I have a vertical layout that I want to remain centered on the page. One column stays fixed on the page while the other should scroll according to the content and there are some decorative floating divs that are absolute. I want the scrolling column to display 100% vertically, even if the content doesn't require the height, but I can't seem to get this to work. I've set the html tag and body tag to height:100%, as well as all of the necessary div tags. Having the html tag set to this

Javascript/jQuery animate to dynamic height?

旧城冷巷雨未停 提交于 2019-12-21 05:29:20
问题 Does anyone know why this animates fine: function setContainerHeight() { $(".pagecontainer").animate({ height: '700px' }, 500); } i.e. a fixed height, but this doesn't animate at all? function setContainerHeight() { $(".pagecontainer").animate({ height: 'auto' }, 500); } It still resizes to auto, but no animation, just snaps to it. My code: JS: <script> function setContainerHeight() { $(".pagecontainer").animate({ height: 'auto' }, 500); } $('.link').on('click', function(e){ $('.pagecontainer

Setting iframe to take remaining space in page

主宰稳场 提交于 2019-12-21 04:26:21
问题 There are quite a lot of questions regarding iframe and it's height. Some are similar but not giving me the right answer. So let me explain my case: JSFiddle: http://jsfiddle.net/AmVhK/3/show/ Editor: http://jsfiddle.net/AmVhK/3/ There is a table with 2 rows. First one contains a div #toolbar with fixed height. Second row contains a div which holds an iframe. I need the iframe to take the available space below the toolbar div. Problem I am facing is in IE standards mode (supporting IE8+). Let