height

jQuery - dynamic div height equal to the height of the whole window

狂风中的少年 提交于 2019-12-09 05:54:59
问题 i am using the code found here jQuery - dynamic div height <script type='text/javascript'> $(function(){ $('#center').css({'height':(($(window).height())-162)+'px'}); $(window).resize(function(){ $('#center').css({'height':(($(window).height())-162)+'px'}); }); }); </script> now the height change works fine when you resize the window, but if your scroll down the height does not change, this means the window property does not include things beyond the size of the browser window so if you

jQuery 1.8 outer Height/Width not working

时光怂恿深爱的人放手 提交于 2019-12-09 05:02:32
问题 I have used outerHeight and outerWidth on many places. Now, after jQuery 1.8 was released I have met a lot of issues caused by object return instead of its size. For example: $('#stackoverflowdiv').Height() // returns 100 px $('#stackoverflowdiv').outerHeight() // returns "stackoverflowdiv" div The only thing that I have found to fix this was to use "true/false" in the function as follows but the I get the same results as the standard width() and height() functions: $('#stackoverflowdiv')

100% Height & Width of container div tag not working

只愿长相守 提交于 2019-12-08 21:15:02
问题 I have a following layout of my web page. Following CSS code gives me 100% Height & Width in Internet Explorer 9. While same does gives me 100% width in FF & Chrome but not 100% height. I tried several example most of them have the same issue. I have use same code on http://jsfiddle.net/cwkzq/3/ here if i view same it FF it gives me 100% height as well as width. <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <style type="text/css"> html, body { height: 100%;

Let Monaco Editor fill the rest of the page (cross-browser)

Deadly 提交于 2019-12-08 17:11:53
问题 I want to embed a Monaco Editor in a page under some fixed texts, I want the height of the Monaco Editor to fill exactly the rest of the page. People gave me an answer here: JSBin: <html> <style> html, body, .rb { margin: 0; height: 100%; } .rb { display: table; width: 100%; border-collapse: collapse; } .top, .myME { display: table-row; } .buffer { display: table-cell; } .top .buffer { background: lightblue; height:1%; } .myME .buffer { background: tomato; } #container { position:relative; }

Calculate height of div based off width & maintain proportion [duplicate]

淺唱寂寞╮ 提交于 2019-12-08 15:13:43
问题 This question already has answers here : Maintain the aspect ratio of a div with CSS (23 answers) Closed 6 months ago . I am looking for a pure CSS solution to what I have here done using jQuery to help. Basically I have 3 divs that spread evenly in width in a container. They maintain a 3/4 ration with the height being calculated off of the width. Furthermore, each div has a background image that stays proportional and some text that is centered horizontally and vertically. $(document).ready

flexbox sticky footer

丶灬走出姿态 提交于 2019-12-08 14:24:23
I'm trying to achieve more or less the same of what is described in this question: Align an element to bottom with flexbox except for the fact that i can't use fixed heights. I have set of two cards that are already in a flex context (their heights are stretched with flexbox): Inside the card I have a series of elements: a header a body a footer (the blue div) What I want is the footer to always stick to the bottom. The inner container of the three elements described above have the following CSS: .card-inner { display:flex; flex-flow :row wrap; align-items: stretch; } and the items inside have

Simple jQuery textarea expand to fit content

最后都变了- 提交于 2019-12-08 12:25:06
问题 In my attempt to build a simple cross browser expanding text area I found that all plugins seam far too overly cluttered. I developed this: $(document).ready(function() { $('textarea').keyup(function() { var txtheight = this.scrollHeight; $(this).height(txtheight) }); $('textarea').keyup(); });​ It is producing unexpected results. On FIREFOX it is working but if I delete lines from the textarea it does not reduce in size. On CHROME the presseing of any key leads to another line height being

Pass variable into jQuery CSS value to calculate height

China☆狼群 提交于 2019-12-08 12:21:00
问题 I desprately need to set this DIV "two" height to be calculated as 100% - (minus) another DIV height (div "one"). The thing is, the height of that another DIV (div "one") is dynamic already. So: <body> <div id="one"></div> <div id="two"></div> </body> div { position: relative; } body { height: 100vh; } I tried things like these, but that doesn't work: $(document).ready(exe); $(window).resize(exe); function exe(){ var topHeight = $('#one').outerHeight(true); $('#two').css("height", "calc(100%

How can I set the height in layoutUnit of primefaces?

烂漫一生 提交于 2019-12-08 10:58:10
问题 I'm using primefaces 5.0. Below is my page where I like to set the height fix to 200px of the layoutunit west and center. Is there any possibility to do this? The current height will be ignored. <?xml version="1.0" encoding="UTF-8"?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" template="/templates/template.xhtml"> <ui:define name

Android: Listview in ScrollView with dynamic height

纵饮孤独 提交于 2019-12-08 10:26:37
问题 currently I am developing a settings menu in a scrollview. The basic structure looks like the following: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:id="@+id/scrollview_settings" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="@dimen/paddingSmall"> <LinearLayout android:layout_width="match