Search Results

Search found 11056 results on 443 pages for 'min height'.

Page 9/443 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Parent CSS (jQuery)

    - by Glister
    There is <dl> with padding-top <dl style="padding-top: 150px;"> <dt>text</dt> <dd><img width="150" height="150" src="..." /></dd> <dt>text 2</dt> <dd><img width="150" height="250" src="..." /></dd> <dt>text 3</dt> <dd><img width="150" height="350" src="..." /></dd> </dl> The difference between images - height. Trying to write a script, which will change a height of the <dl>, when <dd> is clicked. Height should be taken from the height attribute of the dd img. Tryed this, but it doesn't work: $("#posters dd").click(function(){ var parent_padding = $(this).find("img").attr("height"); $(this).parent().css({"padding-top":parent_padding}); }); Thanks.

    Read the article

  • WPF WrapPanel with some items having a height of *

    - by Aphex
    How do I make a WrapPanel with some items having a Height of *? A deceptively simple question that I have been trying to solve. I want a control (or some XAML layout magickry) that behaves similar to a Grid that has some rows with a Height of *, but supports wrapping of columns. Hell; call it a WrapGrid. :) Here's a mockup to visualize this. Imagine a grid defined as such: <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="400"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Button Grid.Row="0" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="1" MinHeight="90">I'm star-sized.</Button> <Button Grid.Row="2" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="3" MinHeight="90">I'm star-sized, too!</Button> <Button Grid.Row="4" MinHeight="30">I'm auto-sized.</Button> <Button Grid.Row="5" MinHeight="30">I'm auto-sized.</Button> </Grid> </Window> What I want this panel to do is wrap an item into an additional column when the item can not get any smaller than its minHeight. Here is a horrible MSPaint of some mockups I made detailing this process. Recall from the XAML that the auto-sized buttons have minHeights of 30, and the star-sized buttons have minHeights of 90. This mockup is just two grids side by side and I manually moved buttons around in the designer. Conceivably, this could be done programmatically and serve as a sort of convoluted solution to this. How can this be done? I will accept any solution whether it's through xaml or has some code-behind (though I would prefer pure XAML if possible since xaml code behind is tougher to implement in IronPython). Updated with a bounty

    Read the article

  • HTML/CSS set div to height of sibling

    - by Paul
    I have 2 div's contained in a third. One of the contained div's is floated left, the other floated right. I would like the 2 sibling div's to always be at the same height, but am having a problem with this. So far I am only viewing the page in Firefox, and figured I'd worry about any cross-browser issues after I get it working in at least one browser. Here is the markup: <div id="main-container" class="border clearfix"> <div id="left-div" class="border"> ... </div> <div id="right-div" class="border"> ... </div> </div> Here is the CSS: #main-container { position: relative; min-height: 500px; } #left-div { position: relative; float: left; width: 700px; min-height: inherit; } #right-div { position: relative; float: right; width: 248px; min-height: inherit; height: inherit; } .clearfix:after { content: " "; display: block; height: 0; clear: both; visibility: hidden; } .clearfix { display: inline-block; _height: 1%; clear: both; } .clearfix { display: block; clear: both; } .border { border: solid 1px #000; } If the content in the #left-div is longer than 500px, the #right-div does not expand to match. In an example I tried, Firefox said the computed style height of the #main-container was 804px, the computed style height of the #left-div was 800px, and the computed style height of the #right-div was 586.2px, as it had expanded to fit it's own content. I understand I might be going about this the wrong way, and if this is a duplicate questions then I apologize, but I wasn't quite sure what to search under.

    Read the article

  • problem getting the height of a UIScrollView

    - by funkadelic
    hi, i am setting the size of a UIScrollView in viewDidLoad: but when I try to get the height of it, i am getting 0 in the console here is my code: - (void)viewDidLoad { [scrollView setContentSize:CGSizeMake(320,500)]; NSLog(@"scrollView: %@", scrollView); NSLog(@"scrollView.contentSize.height: %i", scrollView.contentSize.height); [super viewDidLoad]; } and in the console log i get scrollView: <UIScrollView: 0x4974110; frame = (0 0; 320 367); clipsToBounds = YES; autoresize = RM+TM; layer = <CALayer: 0x4974010>> scrollView.contentSize.height: 0 Shouldn't scrollView.contentSize.height be returning 367? On a related note, i specified the height to be 500 via [scrollView setContentSize:], but that doesn't appear to be applied?

    Read the article

  • Get label height for fixed width

    - by Jonas
    Is there any way I can get the height of a label, if it hypothetically had a certain width? I've been trying with control.GetPreferredSize(size) like so: Dim wantedWidth as Integer = 100 dim ctrlSize as Size = label.GetPreferredSize(new Size(wantedWidth, 0)) because I thought that setting height = 0, would indicate a free height, but the height I get is way too small. I also tried to estimate the height of the label, using Graphics.MeasureString to calculate the equivalent area of the Label dim prefWidth as Integer = 100 dim estSize as SizeF = g.MeasureString(label.Text, label.Font) dim estHeight as Integer = (Integer)(estSize.Width * estSize.Height / prefWidth) but that yields the same result. Any ideas? I'm on .NET 2.0, unfortunately.

    Read the article

  • Getting the height of a div after setting it to auto in IE

    - by Dominic Godin
    Hi, I'm writing some JavaScript that changes the size of some content. To do this I need to know the size of a div within my content. If I have the following html: <div id="wrapper"> ... other stuff ... <div id="inner" style="height:400px">Some text in here</div> ... other stuff ... </div> And the following JavaScript: $('#inner').height('auto'); var height = $("#wrapper").height(); In FireFox and Chrome the height variable increases as the inner div expands to fit all the text. In IE this stays the same. I guess it doesn't redraw the div straight away. Anybody know how to get the new correct height in IE? Cheers

    Read the article

  • element height after content change

    - by Neph
    I have a snippet of code that alters the contents of a DIV to match the contents of a textarea and then applies the height change in the DIV to the textarea element. function growTextArea(parameter) { $('div').find("[data-fieldid='1_description']").text($(parameter).val()); // No Works height = $('.hiddenDiv').find("[data-fieldid='1_description']").outerHeight(); alert(height); // Works heightDiv = $('.hiddenDiv').outerHeight(); alert(heightDiv); $(parameter).css('height', $('div').find("[data-fieldid='1_description']").outerHeight()); } The DIV contents change properly, so the search function is working properly, however the search function always returns the original height of the DIV. The function is called by onKeyUp in the textarea. If the .find is swapped out for a .hiddenDiv the height change is reflected properly.

    Read the article

  • OpenGL-ES Texture Atlas. t axis is inverted.

    - by Feet
    I'm mapping a texture from my texture atlas to a square on a cube. For some reason, the t axis is inverted with 0 being at the top and 1 being at the bottom. Also, I have to specify the texture coordinates in clockwise order rather than counter-clockwise. I am using counter-clockwise windings. The vertices, indices and texture coordinates I'm using are below. float vertices[] = { // Front face -width, -height, depth, // 0 width, -height, depth, // 1 width, height, depth, // 2 -width, height, depth, // 3 // Back Face width, -height, -depth, // 4 -width, -height, -depth, // 5 -width, height, -depth, // 6 width, height, -depth, // 7 // Left face -width, -height, -depth, // 8 -width, -height, depth, // 9 -width, height, depth, // 10 -width, height, -depth, // 11 // Right face width, -height, depth, // 12 width, -height, -depth, // 13 width, height, -depth, // 14 width, height, depth, // 15 // Top face -width, height, depth, // 16 width, height, depth, // 17 width, height, -depth, // 18 -width, height, -depth, // 19 // Bottom face -width, -height, -depth, // 20 width, -height, -depth, // 21 width, -height, depth, // 22 -width, -height, depth, // 23 }; short indices[] = { // Front // Back 0,1,2, 0,2,3, 4,5,6, 4,6,7, // Left // Right 8,9,10, 8,10,11, 12,13,14, 12,14,15, // Top // Bottom 16,17,18, 16,18,19, 20,21,22, 20,22,23, }; float textures[] = { // Front 0.0f, 0.0f, 0.25f, 0.0f, 0.25f, 0.25f, 0.0f, 0.25f, // Back 0.25f, 0.0f, 0.50f, 0.0f, 0.50f, 0.25f, 0.25f, 0.25f, // Left 0.50f, 0.0f, 0.75f, 0.0f, 0.75f, 0.25f, 0.50f, 0.25f, // Right 0.75f, 0.0f, 1f, 0.0f, 1f, 0.25f, 0.75f, 0.25f, // Top 0.0f, 0.25f, 0.25f, 0.25f, 0.25f, 0.50f, 0.0f, 0.50f, // Bottom 0.25f, 0.25f, 0.50f, 0.25f, 0.50f, 0.50f, 0.25f, 0.50f, };

    Read the article

  • merging two tables, while applying aggregates on the duplicates (max,min and sum)

    - by cloudraven
    I have a table (let's call it log) with a few millions of records. Among the fields I have Id, Count, FirstHit, LastHit. Id - The record id Count - number of times this Id has been reported FirstHit - earliest timestamp with which this Id was reported LastHit - latest timestamp with which this Id was reported This table only has one record for any given Id Everyday I get into another table (let's call it feed) with around half a million records with these fields among many others: Id Timestamp - Entry date and time. This table can have many records for the same id What I want to do is to update log in the following way. Count - log count value, plus the count() of records for that id found in feed FirstHit - the earliest of the current value in log or the minimum value in feed for that id LastHit - the latest of the current value in log or the maximum value in feed for that id. It should be noticed that many of the ids in feed are already in log. The simple thing that worked is to create a temporary table and insert into it the union of both as in Select Id, Min(Timestamp) As FirstHit, MAX(Timestamp) as LastHit, Count(*) as Count FROM feed GROUP BY Id UNION ALL Select Id, FirstHit,LastHit,Count FROM log; From that temporary table I do a select that aggregates Min(firsthit), max(lasthit) and sum(Count) Select Id, Min(FirstHit),Max(LastHit),Sum(Count) FROM @temp GROUP BY Id; and that gives me the end result. I could then delete everything from log and replace it with everything with temp, or craft an update for the common records and insert the new ones. However, I think both are highly inefficient. Is there a more efficient way of doing this. Perhaps doing the update in place in the log table?

    Read the article

  • Parabolic throw with set Height and range (libgdx)

    - by Tauboga
    Currently i'm working on a minigame for android where you have a rotating ball in the center of the display which jumps when touched in the direction of his current angle. I'm simply using a gravity vector and a velocity vector in this way: positionBall = positionBall.add(velocity); velocity = velocity.add(gravity); and velocity.x = (float) Math.cos(angle) * 12; /* 12 to amplify the velocity */ velocity.y = (float) Math.sin(angle) * 15; /* 15 to amplify the velocity */ That works fine. Here comes the problem: I want to make the jump look the same on all possible resolutions. The velocity needs to be scaled in a way that when the ball is thrown straight upwards it will touch the upper display border. When thrown directly left or right the range shall be exactly long enough to touch the left/right display border. Which formula(s) do I need to use and how to implement them correctly? Thanks in advance!

    Read the article

  • how does the rectangle bounds (x,y,width,height) in libgdx work

    - by JG22
    I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2or 3 examples with that are pause Bounds = new Rectangle(320 - 64, 480 - 64, 64, 64); this is the pause button in the top right corner resume Bounds = new Rectangle(160 - 96, 240, 192, 36); this is a rectangle resume button in the middle of the page in the menu that comes up when the pause button is pressed. basically my question is aimed at the 360 -64 and 160 -96 because I don't know why this is used I need to create a rectangle that covers the left side of the screen and the same on the right because I want to create a on screen buttons, I have already created the does for these buttons and I have managed to get them to work but I can move the rectangles to where I want. Thank you If you can help

    Read the article

  • TGA loader: reverse height

    - by aVoX
    I wrote a TGA image loader in Java which is working perfectly for files created with GIMP as long as they are saved with the option "origin" set to "Top Left" (Note: Actually TGA files are meant to be stored upside down - "Bottom Left" in GIMP). My problem is that I want my image loader to be capable of reading all different kinds of TGAs, so my question is, how do I flip the image upside down? Note that I store all image data inside a one-dimensional byte array, because OpenGL (glTexImage2D to be specific) requires it that way. Thanks in advance.

    Read the article

  • monitor height differences & the mouse going off screen

    - by fastmultiplication
    In ubuntu 10.10 I have a dual monitor setup. I have an nVidia graphics card and am using twinview. One of the monitors is 1024 pixels high and the other is 900. In the monitor configuration screen & in real life, I have them set up side by side, 1024 on the left. The result of this is that when I am on the bottom of the left monitor and move the mouse to the right, it goes into the hidden area below the right monitor's visible area. It seems like it would make a lot more sense for it to be bumped up to the bottom of the right monitor - since one almost never wants to move the mouse into an area of the screen that doesn't show up. And, systems I have used before have been set up that way. How can I set this up? I am not interested in lists of window managers for ubuntu; I would like to know the identity of a particular WM or set of steps I can take to solves the particular problem I have outlined above. Thanks! EDIT: I changed to use two seperate X window monitors, and set them up relatively positioned so that just the corner touches and the mouse can cross there, so the difference in heights doesn't matter.

    Read the article

  • Make Iframe to fit 100% of container's remaining height

    - by Darkthread
    I want to design a web page with a banner and a iframe. I hope the iframe can fill all the remaining page height and be resized automatically as browser resizing. Is it possible to get it done without writing Javascript code, only with CSS? I tried set height:100% on iframe, the result is quite close but the iframe tried to fill the whole page height, including the 30px height of banner div element, so I got unneccessary vertical scrollbar. It's not perfect. Update Notes: Excute me for not describing the question well, I tried CSS margin, padding attribute on DIV to occupy the whole remining height of a web page successfully, but the trick didn't work on iframe. <body> <div style="width:100%; height:30px; background-color:#cccccc;">Banner</div> <iframe src="http: //www.google.com.tw" style="width:100%; height:100%;"></iframe> </body> Any idea is appreciated.

    Read the article

  • 100% height div inside 100% td

    - by Brizio
    Ok, so here is my problem.. and its buggin me for a while...  i need to set the following DIV 100% height inside this TD without any side-effects (by that i mean scrolling), because for some unknown reason, when i set it to 100% height, looks like IE 8 does some wrong calculations.. I tried a lot of combinations but no success.. transitional doctype is required... thanks in advance for any help! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <style> html, body { height:100%; margin:0px; padding:0px; } </style> <head> <body> <table style="height:100%" border="1"> <tr> <td>TOP</td> </tr> <tr style="height:100%"> <td style="height:100%"> <div style="border:1px dotted blue; height:100%">CONTENT</div> </td> </tr> </table> </body> </html>

    Read the article

  • CSS nested div height 100%

    - by Aaron Moodie
    I've currently got the #border div at 100% of the page height, but am trying to get the #content div to stretch to 100% inside #border. At the moment #content only stretches to fit the content inside it. * { margin: 0; } html, body { height:100%; font-family: Georgia, Times, "Times New Roman", serif; font-size:13px; line-height:19px; color:#333333; background: #f5f1ec; text-align: left; } #border { background: #f5f1ec; border:solid 1px #FFFFFF; width: 880px; margin: 40px auto 0; padding:10px; height: auto !important; min-height: 100%; height: 100%; } #container { background: #FFFFFF; padding: 10px 50px 0; height: 100%; }

    Read the article

  • Is there a way to update the height of a single UITableViewCell, without recalculating the height for every cell?

    - by Chris Vasselli
    I have a UITableView with a few different sections. One section contains cells that will resize as a user types text into a UITextView. Another section contains cells that render HTML content, for which calculating the height is relatively expensive. Right now when the user types into the UITextView, in order to get the table view to update the height of the cell, I call [self.tableView beginUpdates]; [self.tableView endUpdates]; However, this causes the table to recalculate the height of every cell in the table, when I really only need to update the single cell that was typed into. Not only that, but instead of recalculating the estimated height using tableView:estimatedHeightForRowAtIndexPath:, it calls tableView:heightForRowAtIndexPath: for every cell, even those not being displayed. Is there any way to ask the table view to update just the height of a single cell, without doing all of this unnecessary work? Update I'm still looking for a solution to this. As suggested, I've tried using reloadRowsAtIndexPaths:, but it doesn't look like this will work. Calling reloadRowsAtIndexPaths: with even a single row will still cause heightForRowAtIndexPath: to be called for every row, even though cellForRowAtIndexPath: will only be called for the row you requested. In fact, it looks like any time a row is inserted, deleted, or reloaded, heightForRowAtIndexPath: is called for every row in the table cell. I've also tried putting code in willDisplayCell:forRowAtIndexPath: to calculate the height just before a cell is going to appear. In order for this to work, I would need to force the table view to re-request the height for the row after I do the calculation. Unfortunately, calling [self.tableView beginUpdates]; [self.tableView endUpdates]; from willDisplayCell:forRowAtIndexPath: causes an index out of bounds exception deep in UITableView's internal code. I guess they don't expect us to do this. I can't help but feel like it's a bug in the SDK that in response to [self.tableView endUpdates] it doesn't call estimatedHeightForRowAtIndexPath: for cells that aren't visible, but I'm still trying to find some kind of workaround. Any help is appreciated.

    Read the article

  • How to specify behavior of Java BufferedImage resize: need min for pixel rows instead of averaging

    - by tucuxi
    I would like to resize a Java BufferedImage, making it smaller vertically but without using any type of averaging, so that if a pixel-row is "blank" (white) in the source image, there will be a white pixel-row in the corresponding position of the destination image: the "min" operation. The default algorithms (specified in getScaledInstance) do not allow me a fine-grained enough control. I would like to implement the following logic: for each pixel row in the w-pixels wide destination image, d = pixel[w] find the corresponding j pixel rows of the source image, s[][] = pixel[j][w] write the new line of pixels, so that d[i] = min(s[j][i]) over all j, i I have been reading on RescaleOp, but have not figured out how to implement this functionality -- it is admittedly a weird type of scaling. Can anyone provide me pointers on how to do this? In the worse case, I figure I can just reserve the destination ImageBuffer and copy the pixels following the pseudocode, but I was wondering if there is better way.

    Read the article

  • jQuery: attr('height')

    - by jerrygarciuh
    Hi folks, I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px; height:200px; } Why does this: alert('height is ' + $("#container").attr('height')); Return that height is undefined? Thanks, JG

    Read the article

  • all rows plus min / max values using a single stored procedure

    - by Rajeev
    I have a custom data source which pulls out data form a flat file. The flat file contains a timestamp , source and data. I can use sp_execute to execute a select query against the flat file. I'm currently using 2 stored procedures . - one which runs a select * from flat_file into a temp table - the other which does a select min/max from flat_file grouping by source into another temp file Im using the data retrieved using the stored procedures in a SSRS report Is is possible in a a single stored procedure to retrieve all the rows from the file within a date range and also identify the min/max values for each group retrieved ?e

    Read the article

  • jQuery: Get height of hidden element in jQuery 1.4.2

    - by mkoryak
    I need to get height of an element that is within a div that is hidden. Right now I show the div, get the height, and hide the parent div. This seems a bit silly. Is there a better way? I'm using jQuery 1.4.2: $select.show(); optionHeight = $firstOption.height(); //we can only get height if its visible $select.hide();

    Read the article

  • how to select the min value using having key word

    - by LOVE_KING
    I have created the table stu_dep_det CREATE TABLE `stu_dept_cs` ( `s_d_id` int(10) unsigned NOT NULL auto_increment, `stu_name` varchar(15) , `gender` varchar(15) , `address` varchar(15),`reg_no` int(10) , `ex_no` varchar(10) , `mark1` varchar(10) , `mark2` varchar(15) , `mark3` varchar(15) , `total` varchar(15) , `avg` double(2,0), PRIMARY KEY (`s_d_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=8 ; then Inserted the values INSERT INTO `stu_dept_cs` (`s_d_id`, `stu_name`, `gender`, `address`, `reg_no`, `ex_no`, `mark1`, `mark2`, `mark3`, `total`, `avg`) VALUES (1, 'alex', 'm', 'chennai', 5001, 's1', '70', '90', '95', '255', 85), (2, 'peter', 'm', 'chennai', 5002, 's1', '80', '70', '90', '240', 80), (6, 'parv', 'f', 'mumbai', 5003, 's1', '88', '60', '80', '228', 76), (7, 'basu', 'm', 'kolkatta', 5004, 's1', '85', '95', '56', '236', 79); I want to select the min(avg) using having keyword and I have used the following sql statement SELECT * FROM stu_dept_cs s having min(avg) Is it correct or not plz write the correct ans....

    Read the article

  • How to get the height of Label control in Winforms

    - by bmutch
    My label is wrapping the text due to the length of the text. The height property returns the correct value only if there is a single line. How can I get the correct height? Thanks. Solution: I was creating the label dynamically and checking the height then. Later the panel on which the label was residing was added to a form, changing the panel's font and thus also changing the label's font and height.

    Read the article

  • Change the height of a list item when it's in edit mode

    - by toby
    I have custom list item renderers and editors for a List control. I need for the editor to have a greater height then the renderer, i.e., the row should expand(in height) when it goes into edit mode. However, even when the list's variableRowHeight is set to true, it doesn't do what I want: the height seems to be based on the height of the renderer only, not the editor. Is there any way to do what I want?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >