FAQ Database Discussion Community


Parent Element does not fill on Hover State

html,css,hover,height
I am having an issue with a hover state on .socialheader and I can't seem to figure it out. I want the social header to fill up on a hover event but it only fills to the height of the images inside the header. What could I change so that...

How to re-height border for windows resize in XAML WPF

wpf,xaml,height,border
I have a more StackPanels in my XAML. Every StackPanel has a border inside. When I modify the Main Window the width follows the resizing. But the height follows only in one the bigger direction. If I make the Window smaller the height of the borders doesn't follows. So the...

set the height of the cell according to the height of the text content

ios,table,fonts,height,cell
I have a table containing dynamic cell. In each cell, I have textLabel and detailTextLabel. I would like to set the cell height equal to the sum of the height of the textLabel and detailTextLabel.This is my code: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];...

UIButton height unintentionally increased - Widget - iOS 8

ios,uiview,uibutton,height,ios8-today-widget
I am developing an iOS 8 app with a Notification center widget. One problem I am having is that when I first open the widget, the UIButtons (which are in one UIView) are stretched vertically (even though I did not specify this). When the user closes notification center or swipes...

Hot to set weight for width and height?

android,view,height,width,android-layout-weight
I need to create view dynamical with width and height which are the percent of parent size.So I need to add weight for width and height for one view. Is it possible?

How to put column of same height using overflow on one of them?

html,css,twitter-bootstrap,height,two-columns
Hi everybody so i've search a lot around but i cant find any answer that suit me. Here is my problem: I specify right now that i'm using Bootstrap. I have 2 columns working like this : --------------------- | Content | Aside1 | | |------- | | | Aside2 |...

How to provide default font height or content when

or has no characters?

javascript,html,css,text,height
This started with one question similar to this one in here: HTML <p> and <span> questions . And ended with 3... I want to understand why the following happen. Starting with this example: A <p> element without any special CSS rule on it has no text when the page is...

get height of dom element after using get(index)

jquery,height
I use the following (not working code): var height = $("#rows").children().get(index).height(); The thing is that .get(index) returns the DOM element. So after that the height() method does not exist. How can I work around this problem?...

Make div height equal to its parent (100%)

html,css,height
I have a main div that contains two other divs. I need that the first one must have the same height of the parent div. The parent div height is not specified in CSS. Here's an example: http://jsfiddle.net/x8dhnh4L/ The pink div must expand to the full height of the parent...

jQuery .height() doesn't return the right value

javascript,jquery,height,margin
I have a website that needs to be fullscreen at every screen. For this reason I use alot of jQuery to determin the height, max-height, margins, ... I have a margin-top on the container id. When i call the height, which is the base of determing the margin-top, at the...

Using the height() method in jquery

javascript,jquery,html,jquery-animate,height
I am new to jquery and am currently trying to set a variable equal to the height of some div with id="thing" before animating another div with class=".init_leftbar" by the same quantity. var iHeight = $("#thing").height(); $(".init_leftbar").animate({top: iHeight + "px"}); However, this does not seem to be working. if I...

How to get the correct Image height and width

c#,image,height,size,width
I am trying to calculate the size of a Rectangle using the Height and Width of an image in my project. The image (icon) is 20px W and 16px H. When I load it in from a ImageList and look at the image size, it shows that it is 16px...

How to automatically set different item height in ExpandableListView?

android,height,expandablelistview
I'm trying to use ExpandableListView with custom adapter in my project. There is a result view of my activity with ExpandableListView: How you can see, some rows doesn't have a right height and some lines are cropped. What i do wrong? There are my layout files activity layout: <?xml version="1.0"...

Stretch sidebar to 100% height

html,css,height,stretch
How do I stretch a sidebar div to 100% height without the parent height to be specified? The reason the parent height can't be used is because the content area is dynamic.Using height will just clip my div content. Here is what I did: .left { width: 70%; float: right;...

Get the Height of a child div data attribute and then set the Height of the Parent

jquery,css,height
The html looks like this. <div id="carousel4up"> <div class="owl-carousel" data-composer='carousel4up' data-config='{ "height" : 350, "other": false }' ... </div> </div> The hight is set from a data-config file and it could change. I want to set id="carousel4up" height based on the value of class="owl-carousel" data configs key value pair of...

Full height for inner div

html,css,html5,css3,height
See the following image my bottom gray color (parent div background color) height increasing with parent div height. I wanted full height for description div like first div (10px padding for all side). What I am trying: Code: body,html { margin: 0px; padding: 0px; font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; }...

jquery jScrollPane too small viewport

javascript,jquery,height,jquery-jscrollpane
I've some problem using a plugin of jQuery called jScrollPane. At the moment it has a weird behaviour. It just doesn't read the whole height of the contained table. The html stucture is the following: <div id="container-of-the-table"> <table></table> </div> The javascript is the following: setupScrollPane('#container-of-the-table'); function setupScrollPane(el, options) { var...

Equalize height of two div with same parent in CSS

html,css,height
I am trying to equalize the height from two div's, #innerwrapper .sidebar and #innerwrapper > .content, residing next to each other (by float: left) from the same parent, #innerwrapper. I have solved this problem by using jQuery in a seperate file, but since it is a CSS issue, I would...

div doesn't resize height enough

html,css,height
When the content of my #pageContent div goes beyond the screen, the div doesn't resize itself as I would expect, even if I add a "clearing" div at the end of the data. <div id="wrapper"> <div id="pageContent"> ... stuff here </div> <div class="clr"></div> </div> scroll down here on the example:...

'Greater than' some value in height()

jquery,css,height,document
i'm trying to write a jQuery which checks if the document height is greater than some value but it seems it doens't work. So here is what i tried if ($(document).height(>1000px){ $('#colorpicker').click(function(){ $('.colorss').css('top', '500px') }) } ...

How to fix DIV height when resizing width? Mobile/Table/PC browser compatible

css,resize,height,width,percentage
I have a trouble about % width and height: I would like to give every sizes in percentages (mobile, tablet, pc browser, etc. compatibility) but when I resize the browser WIDTH that causes the HEIGHT to be resized too FOR ALL ELEMENTS. How to stop height modifying when height isn't...

flexbox height or big image background

windows,height,flexbox
i actually really like this approach that is big img background, but i want it to be fluid with windows's height as well (before we scroll down to other section or div), so before reaching mobile screen, its height can always stretch and fill the whole browser screen while logo...

racket: maximum height of a binary tree

tree,binary,height,racket,distance
I'm trying to create a code in racket that will find the maximum distance in a binary search tree from the root to a leaf. I've seen this done in C++ but am having trouble translating it to racket. I've managed to calculate all the nodes in a tree, but...

How can I change the height of a button with Swift?

ios,swift,button,height
Depending on the height of the screen, I would like to adjust the height of a button in a view. What is the easiest way to do this in Swift? I tried it in this way and also with CGRectMake() but nothing changed: self.myButton.frame.size.height = self.myButton.frame.size.height*scrOpt How can I "update"...

UITableView: automatically set height for the row and fix it with max height constant

swift,height,row,tableview,cell
I need automatically set the height for the row. I use theTable.estimatedRowHeight = 60 theTable.rowHeight = UITableViewAutomaticDimension but the height is not fixed. I need fixed height something like MAX 60 height, by default height is 40. With estimatedRowHeight the height is not fixed and when the string is long...

Set height of an image same as a neighboring element CSS

css,image,height,element
I was wondering how could you set height of an image to the neighboring elements height. So, essentially I want to have it like this: [div] [img] Other than javascript I can't see a way how can I do this. So, instead of using js can I just use CSS?...

How to set height with percentage when html height is auto?

html,css,css3,position,height
I'm having quite a frustrating problem. What I'm trying to do is make a div "#generic-div" with a height of 20% of the page height, and also set a footer that always sticks to the bottom of the page*; the two seem to be mutually exclusive. *By "page", I don't...

with height in percentage has 0 height when inside table-cell in FF and IE

html,css,height,zero
I want two vertically stacked empty divs (to display background images) to share exactly 50% of the height of the parent container minus a fixed gap (e.g. 20px). I'm using calc() for this - as Opera Mini doesn't matter in my case. I got this working fine on all browsers:...

How to develop a maximum and minimum heigh in a vertical layout? (SOLVED)

android,xml,layout,height,max
This code implements the design of the picture: The upper layout has a maximum height, and if it overcomes this height: a scroll bar is shown. And the bottom layout has a minimum height, and it is aligned to the bottom of the upper layout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"...

Change UINavbar height from for older apps build using Xcode 5 or older

ios,xcode5,xcode6,height,navigationbar
I've noticed the navigation height for the apps that I started with Xcode5 and older is larger than if i create a new application using Xcode6. Is there a way to change the height of the navigation bar. I can't seem to find a solution. Thanks....

Elements disapear when height is relative

html,css,css3,height,width
I have 3 a with width:100%. I don't want to set a height so that the images keep their ratio. For some unknown reason the a elements desappear if height is not specified or set to auto. Any idea why this happens? HTML: <div class="cuerpo"> <div class="articulosysidebar"> <!--articulos--> <div class="articulos"></div>...

Jquery Tumblr Each() Solution?

javascript,jquery,height
The following code is going to be used for a Tumblr blog, to center a div (50px in height) vertically over various images. As the images will have different heights, the code should determine the heights of the images, plus 50, then divided by 2, this will vertically align the...

Chrome applies height property of media query only on refresh

css,google-chrome,height,media-queries,refresh
I have a header with varying height by media queries. When I resize window on FF or even IE, it applies new height value immediately. The problem is, that Chrome only does it on browser refresh. It applies any other value immediately (like background-color), but not the height. Also this...

Create Layout/Screen with four ImageButtons (all of the same size)

android,android-layout,height,imagebutton
I am having a big problem to create an Android Layout, that contains only four ImageButtons. It should look like this: At the moment I created a TableLayout with two LinearLayout (horizontal: each contains two buttons.) But I am doing this by set the exact values: <ImageButton android:layout_width="178dp" android:layout_height="260dp" android:src="@drawable/personal_coach"...

Relative Element with auto-height

html,css,height,css-position
I want to auto-high my relative positioned Div and don't want to use "overflow: scroll/auto". I just want to increase my Div's height when the Childelement needs the space.. #content { position: relative; background: red; z-index: 1; right: 0px; width: 100%; color: rgba(58, 58, 58,1); height: 560px; } #content p,...

100% height not working due to DOCTYPE in HTML5 ASP.net

html,css,asp.net,html5,height
I am trying to make a Asp.net website, The homepage design is a single page portfolio style; by having each or "projects" as 100% height of the view port underneath each other allowing me to use anchor tags. My problem is that when I am using the tag it messes...

How do I vertically centre a div of variable height within a div of variable height?

html,css,alignment,height
I'm a bit of an amateur when it comes to CSS/HTML web stuff but I feel I am learning a lot and am grateful of all the help offered in all the stack overflow questions. I have run into a problem and been searching for a solution for hours already,...

CSS increase width only if max-height reached

jquery,css,height
I want to make a div with max-height and initial width and increase the width only if the content reaches the max-height value? Is it possible to do that without JavaScript? https://fiddle.jshell.net/zn77t0r1/ UPDATE: If not, how to do it easily with JS or jQuery?...

div height 100% with header and footer - no tricks

html,css,twitter-bootstrap,css3,height
I am trying to create a layout where I have a header (nav) of fixed height in px, a footer of fixed px as well and a div in between them that occupies the remaining space. Broken Demo: http://jsfiddle.net/murid/0vcyqm3y/ What I'm trying to achieve is for that blue div to...

floating an element makes the animation smooth and reverse the direction?

css,animation,css-float,height
I am trying to create a simple animation where 3 bars go up and down at a certain time interval. I am making use of height and animation-delay to achieve the effect as you can see. What's surprising is that when I float the bars, the direction of the animation...

Can't get .getwidth() and .getheight() to work

java,android,height,width
I know there have been a lot of other questions on this topic, but I've looked through all of them, and still not gotten it to work. I've made this code for testing: public class MainActivity extends Activity { RelativeLayout layout; TextView widthtext; TextView heighttext; int width; int height; @Override...

Elements do not expand to contain child content

html,css,height
I am building a forum and therefore I am building a preview of a new post. It is also for the layout of each post on my forum. When I added some text to my paragraph it becomes longer the more I add, but that's not my problem like I...

How to set 100% height on a sidebar div?

html,css,position,height,sidebar
I'm trying to figure out a way to display a sidebar inside a div so it will take 100% of the available height. The code is available here. HTML - http://pastebin.com/4nBe2KQS CSS - http://pastebin.com/r63bREbb I have already tried a lot of answers I found like removing the block elements, setting...

jquery accordion get height value

jquery,height,jquery-accordion,value
I'd like to get the height value of the individual panels when active. I know I can use $(document).height() or $(window).height(), but I want to actual height value of the active panel. Is this possible? <ul id="allTabs"> <li><a id="tab-1" href="#buildTab" onclick='windowResize("mainAccordion");' >Build</a></li> <li><a id="tab-5" href="#setupTab" onclick='windowResize("setupAccordion");'>Setup</a></li> </ul> function windowResize(what){ var...

Div with a simple variable height

javascript,html,css,variables,height
So, I want to make a div that has the height of a value I'm going to get from my database. To make it better do understand, the value is a the number of times a client has bought in the website. I'm thinking of a way to make my...

How to vertical space filling?

android,xml,height,android-linearlayout
I am trying to make a calculator for Android, just for testing and start learn android... I was making the UI, the buttons of the calculator are configurated to get the width depending the size of the screen, but I don't know how to make that with the height. My...

Parent div of img tag doesn't get the size in Chrome

jquery,css,css3,responsive-design,height
The problem is a little bit complex, I spent hours with it until I found the reason of the bug. I have a #container, with an img tag. The #container height is dynamic, I calculate it with JavaScript. The image has the following styles: max-height:100%; width:auto; display:block; The #container doesn't...

Auto-adjust image height depending on textbox

html,css,image,height
I'm looking for a way to auto adjust an image's height depending on a textboxs size. The textbox will change in height the browser window's size ( first, the image should match the height of the textbox As the window is resized the picture's height is adjusted This is my...

How to make a
expand to fill space, without stretching parent if there is no space to fill?

jquery,html,css,height,html-table
In a page I am working on, I have a table inside of another table. The inner table may get quite large, so I want it to have overflow-y: scroll so it doesn't make the outer table unnecessarily large. I understand that to make this work, I need to put...

How to change random element heights

javascript,jquery,random,height
Here is my loop: var i=0; while( i++ < 100) { $( "#container" ).append('<li id="li' + i + '" class="item image"></li>'); var y = Math.floor(Math.random() * 200) + 100; $('#li' + i).css({ height: y, }); } This somewhat does what I need it to do. It locates the #container element...

input height different in ios

html,ios,css,height
I have a Search-Bar and a Button on the right, inside a div called homesearchcontent. The problem is that on IOS touch devices the Search-Bar is heigher than the Button. Here is the code: HTML: <form action='./results.php' method='post' class="homesearchcontent"> <input type='text' name='input' id="searchdevice" class="search-field" placeholder="" /> <input type='image' src='img/search6.png' class="search-button">...

CSS 2 columns, first define the max height of the second one, that will use scroll if needed

html,css,height,overflow,scroller
I would like to have a two columns layout where the first column can grown as high as necessary and the second column will be 100% the height of the first one, but if the first one is not higher enough to show all the content of the second column,...

.height() returns height in percent, how to get it in pixels

javascript,jquery,height,width
I've got an element that I want to determine its height and width so I can fill it properly, but when I use $('#element').height(); $('#element').width(); it returns the values in percentages. I've been looking for a solution, but all the questions that come up in my searches imply that jQuery...

how to fit content in browse height

jquery,html,css,window,height
i want make contentarea height browser window hight but minus top and bottom div height also so then i will be fit in properly. i already did some via jquery but i am always 15px extra height. any idea how i can fix that. may be can direct put px...

How much a window is resized in jQuery?

jquery,css,google-chrome,resize,height
Is there a way to trigger an event in jQuery only when someone resizes a window more than like 50 pixels? I want to prevent events from triggering when scrolling on mobile browsers. The scrolling tends to resize the window and cause some glitches. I've looked into debounce functions, but...

Why Does The overflow-y Property Not Work With Percent Height

css,height,overflow
I'm trying to use percentage height with overflow-y:auto; and instead of creating a scroll bar on the side of the div, it's using the page scroll bar. Here's an example of want I'm getting at: http://jsfiddle.net/hmwe2jty/ Is it possible to use this property with percent height?...

Setting div 100% of window without content overflowing

html,css,layout,height
I am trying to set up my page layout to take up 100% of the screen but am running into problems with content overflowing into the footer. Here's the code for the first example: HTML: <div class="container page-container"> <div class="page-leftSidebar"> <div class="sidebar" role="complementary"> <h4>Widget Title</h4> </div> <main class="post-wrapper" role="main"> <section...

How to make objects a percentage of the width of another

javascript,jquery,height,width
I'm trying to put 3 divs that fill the width of the window, and their width changes according to the dimensions of the window. However javascript seems to be giving a window width larger than it actually is causing the objects to flow out of the window causing scroll. You...

Picturebox Height/Width using textbox…How?

textbox,resize,height,picturebox,weight
I want to control picture using textbox and button for submit, but ... private void button_Click(object sender, EventArgs e) { int height = int.Parse(textbox1.Text); height = PublicImage.Height; int width = int.Parse(textbox1.Text); width = PublicImage.Width; } ...

CSS: How to prevent div from overlapping parent height or parent border

html,css,height
I am new to CSS and hope someone can help me with this. I am trying to create a simple progress bar (for later use with JS) that contains three separate color blocks (red, yellow, green). So far I have the below which works in general but the height of...

auto page height on horizontal divs

jquery,html,css,height
I have a one page site with the sections sweeping in horizontally. The problem I have is that I want the page to be a the size of the content of the current div, but the page height gets set to the height of the biggest div and on the...

Issue on Collection View performBatchUpdate when animating a height change of an Item

animation,height,collectionview
There is a problem when using performBatchUpdates method to animate a height change on a CollectionViewCell when this results on new items appearing on-screen that were off-screen before the animation ran. In this case scenario the items initially positioned off-screen appear at their final location instead of being animated there.

Resize a TLayout according to the number of labels in Firemonkey

layout,resize,height,firemonkey,tpanel
here is my sample code in Firemonkey; var f: integer; Label1: TLabel; MyStringArray: TArray<String>; Panel1: TPanel; Layout1: TLayout; begin Layout1.Align := TAlignLayout.Client; MyStringArray := ['aa','bb','cc','dd','ee','ff']; f:= 10; Layout1.BeginUpdate; for i := 0 to length(MyStringArray) - 1 do begin Label1 := TLabel.Create(Self); Label1.Name := 'Label' + i.ToString; Label1.Text := 'Label_' +...

Scrolling divs, adjusting height and position automatically

jquery,position,jquery-animate,height,absolute
I need to scroll blocks of content in a div and I need equal space between each block but I can't really predict that the height of each block will be exactly the same, some might have four lines, some might have three. However the only way I got my...

Making a div height dynamic so there is not a gap with extra content

javascript,jquery,css,height
I'm trying to get this div to always stretch it's height to touch the bottom when the left column has extra content added to it. In the image you see this. What CSS or JS tricks will work on this? HTML: <div class="content-sections" style=""> <div class="grid-container columns"> <div class="left-section grid-55...

Floated Sidebar: How to get sidebar full height of window?

css,height,equals,viewport,sidebar
I know that there will be people that may ask for the full code, but I'm just asking in a very general sense. Say, I have the main content floated to the left with no fixed height and the sidebar floated to the right. I want the sidebar to take...

CSS3 height:75% doesn't want to work

html,css,css3,twitter-bootstrap,height
Here's what I'm trying to do http://www.zabkaspace.me/will/ As you can see, there's a div, with thumbnails on it, and it's scrollable. But the problem is that this div got a size fixed with a specific size (380px). I've try a lot of different settings, and I can't use a size...

jQuery: .height() returns null in .ready() but it works when run the same code console

javascript,jquery,html,height,nul
I'am trying to assign the height to a main div container to give the scroll only to this "rightContent" div. All I am doing is finding height of all other DIV and subtracting the heights of those DIVs with the "window" height, to give the height to main div "rightContent"...

height=100% not rendering the google maps api

javascript,html5,css3,google-maps,height
I am trying to use the Google Maps API. I have gotten a authorization key and pasted in the sample code they gave us, but I can't make the map render even when they tell me to make sure I put a height of 100% on both my map div...

How to make image stretch to a specific paragraph?

html,css,image,user-interface,height
Here is the prototype I am trying to implement Here is what I have right now. I learned from my previous question Side to Side How to align the column of options with the picture - using display inline block attribute- Display. Now I am trying to align the picture...

Empty space after custom eBay description [closed]

css,html5,iframe,height,ebay
My eBay description has a lot of unnecessary space beneath it which is being caused by the height of eBay's description iframe. Listing: http://www.ebay.co.uk/itm/Funny-Dinosaur-Joke-Mens-T-Shirt-Jokes-Clothing-Rude-Silly-/271230187331? When I inspect the element I can see that the iframe with ID "desc_ifr" has a height of 10000px. Does anyone have any suggestions on why...

Why isn't this div with background-image inside table-cell displaying at all?

html,css,css3,height,background-size
JSFiddle. Why doesn't .col-left-bg-image display at all? I just realized that it is not displaying because it does not have any content inside it. So I checked by putting ... into it and giving it a background-size:100% 100% (Initially it was auto 100%). But as a result, the div with...

How to set width and height in jQuery

javascript,jquery,styles,height,width
I have a background image and I am trying to optimize the site by specifying height and width for all images. I cannot figure out how to set width to 450 and height to 350. <!-- BACKGROUND IMAGE --> <script src="js/supersized.3.2.1.min.js"></script> <script type="text/javascript"> jQuery(function($){ $.supersized({slides:[{image:"/images/heritage/background.jpg"}]});}); </script> ...

3 columns same height

html,css,height
I'm trying to set the same hight for three columns. I've been looking around internet and I tried several options, but any of them seems to be working. Here is the code: html <div class="container"> <div id="firstBlockGroup" class="col-md-24"> <div class="columnLayout col-md-8 col-sm-8 col-xs-24"> <img class="imageOfColumn" src="images/leftImg.png" alt=""/> <div class="descriptionPic"> <span...

RecyclerView content height

android,height,recyclerview
Is there any good way of getting the height of the content inside RecyclerView? Considering all items may have different height. In my scenario I'm using a LinearLayoutManager. I've searched around and found surprisingly few results for this problem....

Swift tableView view height equal to amount of cells

xcode,uitableview,swift,height
I have a UItableView that I want the 'view' height to change, based on the amount of cells (data) it has in it. I'm not talking about the cell heights, but the entire table itself. Is there a way to assign the height based on the amount of rows are...

CSS - Container height same height as parent div unless parent div is smaller than container div

css,inheritance,height
I currently get the parents div height with: height: inherit;, but when I scale the window down then the parent div is smaller than the container div so overflow: hidden; hides half of the container content. Is it possible to just do this with css? This is the code: <div...

Making 3 columns of text aligned at the same height or line all the time even while re sizing window

html,css,text,alignment,height
CSS: I want to make 3 columns of text aligned at the same height or line all the time even when I resize the window. To illustrate what I am talking about please take a look at the images by following this link: https://drive.google.com/file/d/0BywbaHflqMTERFVrNF84YlBUbTg/view?usp=sharing The problem is that the third...

iOS 8.3 - UITableView cell height bug

uitableview,height,constraints,ios8.3
On previous iOS versions cell height was working perfectly now it doesn't get the explicit height i give at the uitableview delegate. By the time, i updated to 8.3 rendering is so bad. It goes smaller and towards right. Am implementing a custom cell using a xib file and Swift....

Javascript Image() object erroneously setting height and width to 0 sometimes

javascript,image,object,height,width
I'm working on an app that is dynamically generating images with Javascript's image() object. Code below, where object is the URL I am passing in - resizeImage: function(object) { var img = new Image(); img.src = object; console.log(img); console.log(img.width); console.log(img.height); var ratio; if(img.width > img.height) { ratio = 82/img.width; }...

Surface view and scaling

android,height,scale,surfaceview,weight
Before all, I apologies for my English. I'm a newbie in programming of Android App and I recently discovered the Canvas and Bitmap, so I decided to make a "Game" that can only use landscape. I discovered too the SurfaceView and how implement a background on my SurfaceView, but the...

Android actionbarsherlock get height return 0

android,android-actionbar,height,actionbarsherlock
I was looking for get the height of my actionbar(sherlock). The value returned is 0. value/styles.xml (and for value11 I used "android:actionBarSize") <style name="AppTheme" parent="Theme.Sherlock.Light.DarkActionBar"> <item name="actionBarStyle">@style/Widget.AppTheme.ActionBar</item> <item name="actionBarSize">48dip</item> </style> code : getSupportActionBar().getHeight() ...

Position div below other div, except when height exceeds

css,height
I have an outer div, with a height of 400px; In this div, I have several UL's with a dynamic height (variable amount of LI's per UL). I want the divs to be vertically positioned first, and if it doesn't fit, the UL should be placed next to the div...