height

2 column CSS div with stretchable height

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 17:37:21
问题 Related (possibly duplicate) questions : How do I achieve equal height divs with HTML / CSS ? Make Two Floated CSS Elements the Same Height Hello, every one, I tried for hours to create a stretchable 2 columns div but without any luck. here is my html code and my css code below it <div class="two_cols_container"> <div class="two_cols"> <div class="left-col"> test </div> <div class="right-col"> test </div> </div> </div> my css code is .two_cols_container { width: 100%; height: 100%; } .two

jQuery reports incorrect element height in Firefox iframe

浪尽此生 提交于 2019-12-11 16:38:30
问题 Here a short test to demonstrate my problem. I have a page that loads an iframe: <html> <head> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script> </head> <body> <iframe id="iframe" src="box.html" style="width: 100px; height: 100px"></iframe> <script> $('#iframe').bind('load', function () { var div = $(this).contents().find('div'); alert(div.height()); alert(div.innerHeight()); alert(div.outerHeight()); alert(div.outerHeight(true)); }); </script

$(window).height() doesn't seem exact

淺唱寂寞╮ 提交于 2019-12-11 15:07:24
问题 http://jsfiddle.net/WL5nr/1/ I have a div whose height is larger than the screen and I'm trying to eliminate the scrollbar and have it still fill the page (whatever size the page is). I set overflow: hidden and then set the $(window).height() but I'm still seeing a scroll bar. Doing $(window).height() - 20 eliminates it but it doesn't seem like I should have to do that. And so maybe - 20 works in the jsfiddle.net window... what if the window is bigger? 回答1: The window height does not take

Android toolbar height difference

醉酒当歌 提交于 2019-12-11 12:23:58
问题 recently I started working with android toolbars. I am testing on android version 4.4.4 and 5.1.1. I am facing that the toolbars height are different. I have been trying hard to find an answer with no luck. I can provide source code, if you need. Thanks in advance and Happy Holidays! 回答1: I already recreated the project from scratch, so I can not provide source code. Maybe I forgot to add android:fitsSystemWindows="true" in my layout.xml. 来源: https://stackoverflow.com/questions/34462832

Maintain 16:9 aspect ratio with height 100%

China☆狼群 提交于 2019-12-11 12:22:22
问题 I want to give a div a height of 100% while maintaining a 16:9 aspect ratio. Is this possible using CSS. I’ve seen some examples that have a width of 100% and then use a percentage padding-bottom value. But not sure how to turn it around for a 100% height. 来源: https://stackoverflow.com/questions/33442754/maintain-169-aspect-ratio-with-height-100

Jquery Height-Based Truncate Solution?

天涯浪子 提交于 2019-12-11 12:09:07
问题 I have a project where I need to layout a newspaper like layout with columns but the columns must be a specific height (can at least extend a very little if need be) but holds dynamic content. I need to cut the text, after a sentence ends (a period) even if that means it extends slightly past the limit. I have tried to find back-end solutions to this (as well as attempted my own), css solutions and tricks (overflow:hidden looked horrible) and other tricks here and there but cannot seem to

How do I set the height of an iframe with the min-height property in the body?

南笙酒味 提交于 2019-12-11 11:29:31
问题 a:hover{ cursor:url(files/link.cur),progress; } body{ width:80%; background-color:rgba(255,255,255,0.75); margin:auto; height: 100%; min-height: 100%; } html{ Background-color:#8888FF; background-image:url(files/bg.jpg); background-attachment:fixed; background-position:center; background-size:cover; height:100%; } html, body{ cursor:url(files/cursor.cur),progress; } iframe{ overflow:hidden; height:80%; width:100%; border-width:1px; } img{ display:block; margin-left:auto; margin-right:auto;

Vertical spacing of cells containing a parbox

自作多情 提交于 2019-12-11 11:29:17
问题 I have a complicated longtable with several levels of nested tabular environments. To get text wrapping inside cells and have the contents aligned at the top I use \parbox[t][][t], however, the height of the parbox is computed without any margin such that the following \hline overlaps with the text. A minimal example to reproduce this behavior is \documentclass{article} \begin{document} \begin{tabular} {|p{0.2\textwidth}|} \hline This cell looks good. \\ \hline \parbox[t][][t]{1.0\linewidth}{

How to detect the height of the content of a div?

孤人 提交于 2019-12-11 10:44:37
问题 provided a DIV with fixed heigh disabled scrolling feature whose content is editable I need to understand if its content height as reached or even exceeded the height of the same div according to the element (text or other) inserted by the user (control triggered on event basis). Does anybody have any simple idea how to detect if the content of a DIV has reached or even exceeded the height of the same DIV? 回答1: As stian said in their answer, you can use jQueries height() method to obtian the

Responsive Set width and height to 80%

孤者浪人 提交于 2019-12-11 10:23:38
问题 I have a problem for set responsive width and height to a container. I need to set height and width of the container in 80% of my screen, but thats not work (i think because body have no height and width). thats an exemple code : <div id="container"> <div class="box"> <div class="element"></div> <div class="element"></div> <div class="element"></div> <div class="element"></div> </div> <div class="box"> <div class="element"></div> <div class="element"></div> <div class="element"></div> <div