height

Child height to be 100% of scrollable parent content height

混江龙づ霸主 提交于 2019-12-04 05:16:07
Please consider this fiddle: http://jsfiddle.net/eKJAj/ I'm trying to have an absolute positioned div (the red line) to take the whole height of the total height of its (yellow) parent ; not just the parent's visible height. If you try the fiddle you'll see the red bar doesn't go the whole way down when you scroll the yellow div. Also it can't be bigger than its parent if some blue sections are removed. html: <div class="parent"> <div class="bar"></div> <div class="section"></div> <div class="section2"></div> <div class="section2"></div> <div class="section2"></div> <div class="section2"></div

Calculate cell height for TextView with exclusion paths

六眼飞鱼酱① 提交于 2019-12-04 04:21:33
If I have a TextView with exclusion paths in a UITableViewCell , how can I calculate the cell's height for a given string? I found a solution which I think might be of help to others. Since it does not require the creation of a new NSTextContainer, NSLayoutManager, and NSTextStorage object, which are already instantiated as part of the UITextView, I suspect it would be more efficient. To calculate the size of a UITextView that is using exclusions paths and NSAttributedString, one can do the following: // Assuming something like this... UIBezierPath * exclusionPath = [UIBezierPath

XAML, binding Width and Height properties to the same properties of other control

僤鯓⒐⒋嵵緔 提交于 2019-12-04 04:19:34
I'm trying to create a reflection effect and it's working great except that I have to hard-code some values. This is my XAML: <Grid> <Grid.RowDefinitions> <RowDefinition Height="60"/> <RowDefinition /> <RowDefinition Height="80"/> </Grid.RowDefinitions> <StackPanel Grid.Row="1" VerticalAlignment="Center"> <UserControl x:Name="CurrentPresenter" /> <Border Width="500" Height="200" > <Border.Background> <VisualBrush Visual="{Binding ElementName=CurrentPresenter}" > <VisualBrush.Transform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="-1" CenterX="500" CenterY="99" /> </TransformGroup> <

How to dynamically increase the height of a <div /> based on the contents?

折月煮酒 提交于 2019-12-04 04:11:41
问题 I have a div on a page that I need to put content into. Sometimes the content is a few lines high, and sometimes the content is more than the screen height with varying sizes in between. There is content below the div so I need that content to be pushed down appropriately, so the content below is always right below the div. Basically, it looks as follows: <div id="MainContentArea"><!-- my content --></div> <div id="BottomContentArea"><!-- pre-existing content --></div> It's easy for me to

how do i animate a specific height to 100% in jquery

╄→尐↘猪︶ㄣ 提交于 2019-12-04 04:02:35
i want to have a little "preview" of the content in the div, so i made it so small that only only the first line is shown. now i want to animate it that when you click the title, the div will have the height of 100%, but when i use animate(height:"100%") there is no nice sliding. <a href="javascript:void(0);" class="show_it">title:</a> <div> content<br> content_hidden </div> <script> $('.show_it').click(function() { $(this).next("div").animate({ height: 'auto' }, 1000, function() { }); }); </script> <style> div{ height:20px; overflow:hidden; } </style> Although I am sure there is a better way

$(window).height() issues in IE and FF

不打扰是莪最后的温柔 提交于 2019-12-04 03:58:18
问题 I wrote a script to make a dynamic sized div (#table) inside my page. I also have a menu (#menu) with a nav inside that establishes the min-height. In Chrome and Safari it all works ok, but in IE/FF not so much. In both I have the same problem: If I load the page full screen and then I minimize it with the minimize button, it takes the wrong $(window).height() . If I reload it minimized, it works ok, I can even resize such that the div adjusts ok. I put some images to be clear about what I'm

Two vertical divs within a 100% height div

无人久伴 提交于 2019-12-04 03:42:08
问题 Sorry for my bad english, hope you will understand my issue. I'm turning my head around a problem that I know I've been solving once before. The issue is that I need two DIVs inside a div where one of the DIVs has a given height and the other one fills up the rest of the parent div height. The problem is that the second div (with no defined height, or 100% height) needs to be overflow-able with an vertical Scroller. All this is to make an "outlook" lookalike windowsetup where you operate a

iframe reaches bottom of page

天涯浪子 提交于 2019-12-04 03:09:58
问题 Is there a way to make the height of the <iframe> reach exactly the bottom of the page? It is hard to judge by using height:xx% , and it might be dependent on browser. The code is below: <!DOCTYPE html> <html> <body style="margin:0"> <p style="margin:10px"> hello </p> <iframe src="http://www.weather.com" style="width:100%; height:95%"></iframe> </body> </html> 回答1: Using JavaScript/jQuery, you can precisely set the right dimension for the IFRAME element, without the need to access to DOM of

How to get page content to stretch and stick footer to bottom of page?

拜拜、爱过 提交于 2019-12-04 02:31:28
问题 I have been trying to get this my damned layout to work for so long now and its super frusterating. I am new to CSS so please be easy, but i have looked up so many articles about sticky footers and stretching content, etc etc etc, and i still can't get it to work. Min-height does nothing for me! Here is what i want my site to look like when it doesn't have enough content to fill a page. And this is what i want it to look like when the content makes you scroll. Here is the html code: <!DOCTYPE

CSS - How to force elements to 100% of remaining/available space of parent element without extending beyond it?

亡梦爱人 提交于 2019-12-04 02:17:34
This seems like a really amateur question, in my opinion, but nonetheless it's still a frustrating anomaly. This is actually the 2nd part of a 2 part problem. The first part is a rather common one, involving getting an element to stretch to 100% height of its parent object. In my demo, I have the following HTML: <body> <div id="sbcontainer"> DIV 1 <div id="sbcontent"> DIV 2 <table id="sbmaintable" cellspacing="0"> <tr> <td> TABLE </td> </tr> </table> <!-- END MAINTABLE --> </div> <!-- END CONTENT --> </div> <!-- END CONTAINER --> </body> I want each element here to fill all vertical space