height

Set button height and width as wrap content and fill parent

你说的曾经没有我的故事 提交于 2019-12-22 05:58:16
问题 I'm developing a application where the user is supposed to be able to alter the apperence of a button by pressing other buttons. I use four buttons to set height as wrap content, height as fill parent, width as wrap content and width as fill parent. I googled a bit and found a solution using LayoutParams although that code didn't specify if height of width was alterd. I also got errors saying my IDE couldn't recognise "LayoutParams". What is the best way to do this? 回答1: What you need to look

Setting body height to 100%

别说谁变了你拦得住时间么 提交于 2019-12-22 04:18:11
问题 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

how to overwrite css height set by jquery/javascript?

徘徊边缘 提交于 2019-12-22 03:44:31
问题 I have this: var setHeight = $(this).outerHeight(); // returns e.g. 687 $("#someElement").css({'height': $setHeight+"px !important" }); // I want to override this jquery-set height I'm not sure this is the right way... probably not, since it's not working. Thanks for helping out! 回答1: setHeight , not $setHeight . and the !important is unneeded. 回答2: Your variable name doesn't have a leading $ . Also, the !important flag will cause this not to work in Firefox, however as you're applying this

how to overwrite css height set by jquery/javascript?

坚强是说给别人听的谎言 提交于 2019-12-22 03:44:13
问题 I have this: var setHeight = $(this).outerHeight(); // returns e.g. 687 $("#someElement").css({'height': $setHeight+"px !important" }); // I want to override this jquery-set height I'm not sure this is the right way... probably not, since it's not working. Thanks for helping out! 回答1: setHeight , not $setHeight . and the !important is unneeded. 回答2: Your variable name doesn't have a leading $ . Also, the !important flag will cause this not to work in Firefox, however as you're applying this

Change height/width of object SVG using JavaScript

走远了吗. 提交于 2019-12-22 02:01:29
问题 I want change height or width when a click in a button. I try this but not work: function modify(){ document.getElementById('cercle1').style.height = "10px"; document.getElementById('cercle1').style.width = "10px"; } 回答1: In SVG width and height of <rect> elements are attributes and not CSS properties so you'd need to write document.getElementById('cercle1').setAttribute("height", "10px"); similarly for the width. 来源: https://stackoverflow.com/questions/26392165/change-height-width-of-object

UITableView - dynamic cell height controlled by cell itself

好久不见. 提交于 2019-12-22 00:15:40
问题 I have the following setup: UITableView with custom UITableViewCell implementation. In each cell I have a UILabel and a UIButton. When the table is first displayed, in each of the cells, the UILabel has the number of lines set to 1 and all cells have fixed height (60 px in my case). When the button in the cell is tapped, then the UILabel's number of lines is set to 0 and word wrap is turned on, effectively expanding the table cell. Now, the issue is that only the implementation of

Major problem with 100% height div

我的未来我决定 提交于 2019-12-21 22:47:16
问题 /* Left menu */ .leftMenu{ width: 200px; border:2px solid green; float:left; background-color:#c0c0c0; } /* Main Content area */ .mainBox{ border:2px solid red; background-color: #ffffff; } .mainWrapper{ border:2px solid white; } With <div class="mainWrapper"> <div class="leftMenu"> left </div> <div class="mainBox"> main<br /><br /><br /><br /><br /> </div> <div class="clear"></div> </div> How the blazes do I get the left menu to extend to the bottom? Please note I've tried faux columns but

Getting SVG container size in snapSVG?

房东的猫 提交于 2019-12-21 21:28:33
问题 What is the correct way to get the size of the 'paper' object with SnapSVG, as soon as it has been created? My HTML looks something as follows: <div id="myContainer" style="width: 900px; height: 100px" /> And then the Javascript code: function initViewer(elementId) { var element, elementRef, snap; elementRef = '#' + elementId; element = $(elementRef); element.append('<svg style="width: ' + element.width() + 'px; height: ' + element.height() + 'px; border: solid 1px black;"/>'); snap = Snap

Why isn't my function running on document load as expected?

泄露秘密 提交于 2019-12-21 17:47:42
问题 This code should set an elements height; however no style gets added. Am I missing something obvious? function setGround() { document.getElementById('content').style.height = '40px'; } document.onload = setGround; The HTML is quite basic: <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Template</title> <link rel="stylesheet" type="text/css" href="css/default.css"/> <link rel="stylesheet" type="text/css" href="css/orange.css"/> <script type=

What exactly does the 'auto' value mean for the CSS height property?

谁都会走 提交于 2019-12-21 17:18:56
问题 w3schools says that for height : auto : The browser calculates the height. This is default But what does “browser calculates the height” mean? Does it mean it just simply sums up the contained elements’ heights? Is this always calculated with the same method for all browser? 回答1: What does it mean browser calculates the height ? It means the browser will make the element's height sufficient to fit its content. Does it mean it just simply sums up the contained elements heights if they are up