height

How to make a div stretch its height between two other divs and center its content

余生颓废 提交于 2019-12-03 16:21:18
I want to make a one Column Layout with 3 section Section 1: Header Section 2: A Content Section that stretchs from beneth the header to the beginning of the footer, which has it's content centered vertically and horizontally within itsel Section 3: Footer that always resides at the bottom of the browser window. The Problem: I can't get the content div to strech to the beginning of the footer/bottom div. If I enter height:100% it automatically stretches till the end of the whole page. Also would like to center the content inside this middle div vertically and horizontally - though I have not

iOS: Resize UIWebView after didFinishLoad (content should fit without scrolling)

自作多情 提交于 2019-12-03 15:37:09
I am absolutely unable to resize my UIWebView . My UIWebView is declared in .h and in connected in IB. The height in IB is 110. But the height of my text is about 1500. Now I'd like to change the height so the full text is readable without scrolling. What code does resize my UIWebView in webViewDidFinishLoad ? Can't find ANYTHING that works. John Stephen The UIScrollView property is available for UIWebView starting in iOS 5. You can use that to resize your view by implementing the webViewDidFinishLoad: message in your delegate, like this: -(void)webViewDidFinishLoad:(UIWebView *)webView {

Setting iframe to take remaining space in page

。_饼干妹妹 提交于 2019-12-03 13:34:36
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's say , the height of the window is 1000px and height of toolbar is 200px, then the height of the

Firefox/Safari setting height as [specified height - padding - border] for input[type=button]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 13:11:37
When I use the following CSS: input[type=button] { background-color: white; border: 1px solid black; font-size: 15px; height: 20px; padding: 7px; } with this HTML: <input type="button" value="Foo" /> I expect to see this, so the total height becomes 36px : 1px border 7px padding 20px content (with 15px text) 7px padding 1px border But instead both Firefox 3.6 and Safari 4 show this: (Haven't tested in other browsers) Screenshot http://labs.spiqr.nl/upload/files/1223ef9cbae3ab6e43bd1f9215ebedb157ac7b22.png 1px border 7px padding 4px content (with 15px text) => height - 2 * border - 2 * padding

can't get true height/width of object in chrome

女生的网名这么多〃 提交于 2019-12-03 12:40:49
问题 I have a question, if i set a image height in css and try to get height/width i get different results in different browsers. Is there a way to get the same dimension in all browsers? You can find a live example here <-Removed and the concept is like this: CSS: img{ height:100px; } Script: $(document).ready(function(){ $("#text").append($("#img_0").attr("height")); $("#text").append($("#img_0").attr("width")); }); Output Firefox: img height: 100 img width: 150 Output Chrome: img height: 100

Setting 100% height on an absolutely positioned element when the content expands past the window size

筅森魡賤 提交于 2019-12-03 12:35:52
So after reading Stack Overflow and the web, I've gathered that there are two main tricks to achieving 100% height: Set height:100% on both the HTML and BODY Set your element to have either: height:100%, or top:0, bottom:0, position:absolute However, even with those tricks I'm having difficulty setting the height of an absolutely positioned DIV to a true 100%. I can get 100% of the viewport size, but if the user scrolls down at all it becomes apparent that the div doesn't truly have 100% height. I've made a simple JS Fiddle of the situation here: http://jsfiddle.net/9FEne/ My question is: does

CSS how to position element in half height (vertical 50%)

纵饮孤独 提交于 2019-12-03 12:34:01
I'm looking forward to build a tooltip which is positioned next to the element. It's easy to put it over and under in the center of element. But is there a way to do so vertically (on the right or left side of element vertically positioned in a middle of elements height)? For my purpose, height of the element is known & height of tooltip is not. And tooltip can be a child of element. But, I'm also curious about how to do it when both heights are unknown. By heights I understand element's and tooltip's height. Width can be known and fixed. This is pretty late but I tried to make an example on

How to make a div height to fill available space

帅比萌擦擦* 提交于 2019-12-03 11:56:54
I have a 3 column layout with some details below the columns. You will notice that one of the column's height is greater than the others'. I'd like the other two divs to automatically fill the remaining space (up to the blue div). The text will be loaded dynamically so I need this to work with any column being larger (and by an arbitrary amount). Can this be done with HTML/CSS or do I have to use some JavaScript? HTML code (relevant part of it): <div id="content"> <div id="iconsHolder"> <div id="info"> <div id="info_content"> <p><?php echo img('images/man.png'); ?></p> <h2>Some guy over here<

How to create two views in Android that use 50% height each, unless one is smaller?

£可爱£侵袭症+ 提交于 2019-12-03 10:52:43
Imagine a full Android device screen, I want it split in to two sections: The upper half has text in it, which may be larger than the space available (or not) and so the text will scroll (i.e. TextView inside a ScrollView) The lower half contains a MapView control. Looking specifically at some scenarios: If the text is small, I want the map to take up more space, i.e. more than 50%. So perhaps 20% text, 80% map. If the text is larger, it only takes up a MAXIMUM of 50% of the screen space, and then scrolls. So 50% map, 50% text. At the moment I've assigned weights to the two parts, and that isn

Printing a bootstrap page from Google Chrome cause (sometimes) truncation height of the printed page

为君一笑 提交于 2019-12-03 10:42:41
问题 Starting from this official template: http://getbootstrap.com/examples/jumbotron/ of bootsrap v. 3.3.7 and using Google Chrome v. 54.0.2840.99 m (64-bit), on maximized window 1920px monitor, when i try to print the page in A4 horizontal format the print preview (and the saved PDF or printed page) is height truncated. In this specific case should be 2 pages height instead of 1. This happened when: Printing from Chrome (in Firefox v50.0.1 and IE11 the issue is not present) When the cols are not