height

How to set height and width in proportion with superview in SwiftUI?

有些话、适合烂在心里 提交于 2019-12-08 09:45:52
问题 I want to know that is it possible to adjust height and width in proportion according to superview in SwiftUI to any UIControl ? As we are doing like : let txtFld = UITextField() txtFld.frame = CGRect(origin: CGPoint(x: 0, y: 0), size: CGSize(width: self.view.frame.width/2, height: self.view.frame.height*0.1)) I know we can somehow achieve to adjust width by using Spacer() , .padding and edgeInsets . But what about height ? I have seen lots of tutorial for SwiftUI , everywhere height is

ORBIT 100% height over 100% widht slider zurb foundation. 16:9 4:3

时间秒杀一切 提交于 2019-12-08 09:01:33
问题 I need some help with orbit slider. I want to make it 100% width and 100% height , but.... I have a 1920x1080 slider images. Images should always taking 100% height but width should be over 100% (if display propotion will change). Just slider should crop width over browser window ( overflow: hidden; ) .orbit { position: relative; width: 100%; height: 100%; overflow: hidden; max-width: none; } .orbit-container{ max-height: 100%; } .orbit-slide { overflow: hidden; margin: 0 auto; } .orbit-image

css: set the height of floating divs as maximum of their heights

元气小坏坏 提交于 2019-12-08 08:14:39
问题 Is it possible to fix this jsFiddle with pure css so that all 3 divs that are in the same row have the same height, the maximum of their 3 heitghts? The code is here: <style> #main{ border:1px solid red; width:605px; overflow:hidden; } #zero{ border:1px solid blue; } .small{ border:1px solid green; float:left; width:199px; } </style> <div id="main"> <div id="zero"> 0 </div> <div class="small"> small text </div> <div class="small"> large text large textlarge textlarge textlarge textlarge

How to scale height of views and postion of the views relative to the screen size using AutoLayout [closed]

↘锁芯ラ 提交于 2019-12-08 06:38:18
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 2 years ago . Using Autolayout what is the best way to keep a view's relative position and scale to each screen size? For example there are drastic differences between the 4s and iPad Pro. What type of constraints and thought processes should I be using? The views being scaled may each have

Sliding Div to auto height

自作多情 提交于 2019-12-08 05:38:40
问题 I have a div that I slide in and out. To do this I just increase the height by 2px every second until a preset height from a height of 0. Is there anyway to determine the content height of the div as the content is unpredictible height considering the starting properties of the div are display:none and height:0? Thank you. 回答1: The trick is to temporarily show it, measure the height, then hide it again. And if you use visibility: hidden and position: absolute, it won't change the page layout

How to provide default font height or content when <p> or <span> has no characters?

半城伤御伤魂 提交于 2019-12-08 03:26:24
问题 This started with one question similar to this one in here: HTML <p> and <span> questions . And ended with 3... I want to understand why the following happen. Starting with this example: A <p> element without any special CSS rule on it has no text when the page is loaded, therefore height:0 . Due to javascript operations in the page, it starts having characters, thus the height is set to the default font-size , which allow us to see the text. How can I assure that this <p> has always the same

jQuery flot more space at the top

谁说胖子不能爱 提交于 2019-12-08 02:53:06
问题 How can i create more space at the top of the charts? Now i get this: But i want this: This is my JS code: $("table.chart").each(function() { var colors = []; $("table.chart thead th:not(:first)").each(function() { colors.push($(this).css("color")); }); $(this).graphTable({ series: 'columns', position: 'replace', width: '100%', height: '200px', colors: colors }, { xaxis: { tickSize: 1 } }); }); 回答1: Adjust the autoscaleMargin property of the y axis. From the API: The "autoscaleMargin" is a

How do I fix the height of my view after collapsing NSSplitView?

こ雲淡風輕ζ 提交于 2019-12-08 02:48:09
问题 I've got an NSSplitView with an NSScrollView in the bottom view. The problem is when I collapse, and then re-open (un-collapse) the bottom view, the height of the scroll view is beyond the height of that bottom view so the top part of the scoll view is being clipped. I've got my scroll view and my split view set to autoresize in all directions in IB. Do I need to adjust the height of that scroll view after the un-collapse or am I setting a resizing property wrong, or something else? Below is

Middle div with 100% in CSS? [duplicate]

耗尽温柔 提交于 2019-12-08 01:08:25
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: CSS - percentage height I can't get the middle div of 3 divs to fit 100% of available space. <body> <div id="container"> <div id="header"> </div> <div id="content"> </div> <div id="footer"> </div> </div> </body> My CSS is: html, body { margin: 0; padding: 0; border:1px; vertical-align:top; font-family:"Trebuchet MS", Arial, Helvetica, sans-serif; font-size:14px; color:#333; height: 100%; } #container { height:

Cross-browser method for getting width and height of a DIV?

纵然是瞬间 提交于 2019-12-08 00:50:00
问题 This is my first post, so please go easy on me. I'm sure I'm doing everything wrong. However, I couldn't find any posts that answered the question above. I use jQuery. I'm trying to find a way to get the current width and height of a DIV element, even if they're set to "auto". I've found many ways to do this, but no method returns the same width in IE. It is important that this method is cross-browser, as it will break the layout of the page if different numbers are returned in different