height

calculating UIWebView height with images gives wrong answer

馋奶兔 提交于 2019-12-25 03:35:05
问题 I found how to calculate dynamic uiwebview height according to its content. My code is : println("webViweDidFinish started") var frame:CGRect = myWebView.frame frame.size.height = 1 var fittingSize :CGSize = myWebView.sizeThatFits(CGSizeZero) frame.size = fittingSize myWebView.frame = frame var contentsizeHeight = webView.scrollView.contentSize.height var yCoordinateOfWebView = myWebView.frame.origin.y var contentHeight: CGFloat = webView.scrollView.contentSize.height; myScrollView

Set column to full height of the page

笑着哭i 提交于 2019-12-25 03:14:56
问题 I'm attempting to create a column in css that is 100% height of the page. Specificially the left column with the background transparency. I've tried to make the contain use the overflow: hidden, but it doesn't seem to be working. I know I'm targeting the issue incorrectly and and I think that the header and footer are messing the columns up. 回答1: You could set the height with javascript ( using jQuery in this case) at page load : $(function () { $('.left_col').height($(document).height()); })

Nscell Size Not Increasing With Row Height During Text Edit

限于喜欢 提交于 2019-12-25 03:08:49
问题 My NSTableView has variable height rows. The rows correctly resize after an edit of a cell has been completed, and during/after resizing the column/table. The Row also correctly resizes while a user is typing into the text cell. However, the cell itself does NOT resize during editing to match the height of the row. Does anyone have any ideas on this? In this screenshot one end-edit has occurred already (which is why the text area is larger than 1 line) but there is currently enough text in

How to Set Height of a div same as the Screen Height

时光总嘲笑我的痴心妄想 提交于 2019-12-25 01:41:31
问题 I need a div height changable if the screen size changes. I also need that div is scrollable because the content may be Large. But only when it is larger than the screen zize. Also it should Work on IE6 Is there any Possibility for that? If yes, Please Give me the Complete css, html and javascript. 回答1: set width 100%; It's works body { width:100%; height:100%; } #wrapper { width:100%; background:#ccc; } 回答2: if the div is a direct child of body than just set height: 100% on both the div and

Gradient full scale background CSS

余生颓废 提交于 2019-12-24 19:24:09
问题 Full page CSS3 Gradient Backgrounds: Alright so I am trying to make my background be a gradient that is always 100% width and height, and it works, except for the fact that nothing will show up on top of it. Here is the code I currently have. CSS: <style type="text/css" media="screen"> #bodyBg{ background:rgb(79,143,249) no-repeat center center fixed; /* Old browsers */ background: -moz-radial-gradient(center, ellipse cover, rgba(164,197,252,1) 1%, rgba(79,143,249,1) 100%); /* FF3.6+ */

DIVs {height: 100%; } inheriting grandparent's height and overflowing parent's height

南笙酒味 提交于 2019-12-24 19:02:28
问题 I am encountering some problems with div.images when trying to set {height: 100%; } : computed height does not equal the parent div#placeholder 's height, but the grandparent div#home-screen 's. <!DOCTYPE html> <html> <body> <div id="page-wrapper"> <div id="home-screen"> <header> <div></div> </header> <div id="placeholder"> <div class="images"></div> <div class="images"></div> <div class="images"></div> <div class="images"></div> </div> <div id="cross-screen-content"> <div></div> </div> </div

TableView inside tableview cell swift 3

和自甴很熟 提交于 2019-12-24 18:51:17
问题 I'm tring to display tableView inside tableview cell while both parent and child tableview have dynamic cell height. First problem is not all cells show child tableView. In cells that show childTableView, childTableView height is not right. class ViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var items = ["Consider, though, that Swift uses value types almost exclusively, which is mind-boggling when you consider that the situation in Objective-C is completely the

set extended ImageView width and height programatically - android

只谈情不闲聊 提交于 2019-12-24 16:26:03
问题 I have a custom class that extends ImageView that I'm programatically putting on to a RelativeLayout. I want each one of these images to be a specific width and height. I've tried setting the width/height in code with LayoutParams and with setMaxWidth/setMaxHeight...neither seem to be working. Here is the code from the constructor of the class: LayoutParams p = new LayoutParams(50,67); this.setLayoutParams(p); this.setImageResource(WhichImage(wi)); this.setMaxWidth(50); this.setMaxHeight(67);

Retain aspect ratio for full height responsive image in Chrome

℡╲_俬逩灬. 提交于 2019-12-24 16:12:08
问题 I've set an image to max-height:100%; of the browser window (with a small padding at the bottom), centred on the page. Currently, I'm having problems keeping the aspect ratio of the image from squashing when the browser is resized (interestingly it shows at the correct aspect ratio when refreshed after a resize). I've set up an example in codepen. Would appreciate any advice on how to keep the ratio correct. http://cdpn.io/sHJhl UPDATE 18/08: I've updated the code in the copepen above. It's

Same height for flex items in the flex-direction column flex container

吃可爱长大的小学妹 提交于 2019-12-24 14:27:13
问题 Is there a way to have flex items within a flex container with flex-direction: column have the same height, using css only? <div style="display: flex; flex-direction: column;"> <div class="flex-item"> <!-- other html elements with image, links, button etc. --> </div> <!-- ... --> <div class="flex-item"></div> </div> fiddler: https://jsfiddle.net/hzxa9v54/ 回答1: You will need a script to solve that using Flexbox, here done using jQuery. Updated fiddle Stack snippet (function ($) { // preload