Menu
  • HOME
  • TAGS

RecyclerView content height

android,height,recyclerview

RecyclerView is a ViewGroup. You can use getChildAt / getChildCount to get views. Then from the view, you can call getWidth / getHeight. If you have ItemDecorators and need to get size including them, you can use LayoutManager's getDecorated<xxx> methods....

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

javascript,jquery,html,height,nul

If you´re creating the content at runtime, you need to wait until this happens. document.ready is fired just after the browser finished to parse all the DOM, but before others scripts (like ajax calls, etc). One possible solution is to defer the change push() calling using a setTimeout, or calling...

Adjusting Bootstrap dropdown menu height

html,css,twitter-bootstrap-3,height,navbar

You need to target direct child in your css: .navbar-brand, .navbar-nav > li > a { line-height: 100px; height: 75px; padding-top: 0px; } Not .navbar-nav li a as this affects all links inside your navbar....

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

css,animation,css-float,height

http://www.w3.org/wiki/CSS/Properties/float CSS/Properties/float left The element generates a block box that is floated to the left. Content flows on the right side of the box, starting at the top. right Similar to 'left', except the box is floated to the right, and content flows on the left side of the...

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

display the divs' block-wise and float those to the left. .f-container .f-item-3col { display:block; float:left; width: 33.33333333%; box-sizing: border-box; -moz-box-sizing: border-box; margin-bottom: 50px; } ...

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

html,css,height,zero

Unfortunately, there is no solution. Obviously, the behavior of height with table-cells is not part of the spec. Just found this thread: IE display: table-cell child ignores height: 100% Nothing to be done. Good old JS to the help!...

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

css,height,overflow

Use the vieuwport height/width instead of a percentage. Change 100% to 100vh, and you're done!

change the width & height of ImageButton at runtime in android

android,height,runtime,width,imagebutton

You can change properties of a View by using LayoutParams class LayoutParams lp = (LayoutParams) btn_new.getLayoutParams(); lp.width = yourWidth; lp.height = yourHeight; btn_new.setLayoutParams(lp); Update RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(yourWidth, yourHeight); yourButtons.setLayoutParams(layoutParams); ...

Scrolling divs, adjusting height and position automatically

jquery,position,jquery-animate,height,absolute

If I understand you correctly you need a way to check the height of the blocks to determine how far to scroll. Maybe the following could serve as some kind of inspiration: Fiddle here var currentBlock = 1, max = $('.container .block').length; $( "#prev" ).click(function() { if(currentBlock > 1) {...

Elements do not expand to contain child content

html,css,height

You are not clearing the floats. You can add overflow: hidden; to #prevContainer or use: #prevContainer:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } ...

Stretch sidebar to 100% height

html,css,height,stretch

you can set the parent of left and right to position:relative,and set the right element to position absolute. .outer { position: relative; ... } .right { position: absolute; right: 0; top: 0; height: 100%; right: 30%; background: yellow; } .left { width: 70%; background: green; padding-right:5px; box-sizing: border-box; } jsfiddle:...

What does % height in css mean

css,height,percentage

Then I thought I could just add 15% margin-top or add 15% padding-top (to the parent) to vertically center the p tag in the div... but I find I need to set it to something like 3%.... how come? Because percent margins and paddings (top, right, bottom and left)...

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

ios,table,fonts,height,cell

If you're using AutoLayout on iOS8, a important part is to tell the UITableView to be "autolayouted": self.tableView.rowHeight = UITableViewAutomaticDimension; self.tableView.estimatedRowHeight = 50.0; // your estimated average cell height Also, it would be best to use a custom cell and override the Method "layoutSubviews": - (void)layoutSubviews { [super layoutSubviews]; //...

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

android,android-layout,height,imagebutton

Try something like: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:weightSum="2"> <LinearLayout android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" android:weightSum="2" android:orientation="horizontal"> <ImageButton android:layout_width="0dp" android:layout_height="match_parent"...

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

jquery,css,height

One problem, you need to have single quotes: data-config='{"height" : 350, "other": false }'; To make the attribute into a JS array, do it like: var owlHeight = $.parseJSON($(".owl-carousel").attr('data-config')); //or the non-jQuery version JSON.parse($(".owl-carousel").attr('data-config')); Then call it like: $("#carousel4up").height(owlHeight['height']); JSFiddle Demo...

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

html,css,twitter-bootstrap,height,two-columns

On your HTML add aside1 and aside2 like so: <div class="container-full"> <article class="col-md-8 col-xs-12"> <p>Long content there: Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex...

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

css,height,equals,viewport,sidebar

Giving position:absolute; and 100% height to the sidebar will do. http://jsfiddle.net/07zLb3xx/ #sidebar { height: 100%; position: absolute; right: 0; } If you have problems with the sidebar going out of the parent wrapper, give position:relative; to the parent wrapper like this http://jsfiddle.net/07zLb3xx/1/...

CSS Background image not showing with height auto

height,auto

Height: auto means the height of element is exactly the same as elements content. If you have empty element, its height is zero. And you can't see background image (you see exactly 0px of them).

auto page height on horizontal divs

jquery,html,css,height

To make the footer appear at the bottom of each page, you will have to place it in each page rather than having one footer placed after all of the pages. Like this: <div id="page-1"> Content for page 1 <div class="footer">footer</div> </div> <div id="page-2"> Content for page 2 <div class="footer">footer</div>...

Android actionbarsherlock get height return 0

android,android-actionbar,height,actionbarsherlock

This didn't work? // Calculate ActionBar height TypedValue tv = new TypedValue(); if (getTheme().resolveAttribute(android.R.attr.actionBarSize, tv, true)) { actionBarHeight = TypedValue.complexToDimensionPixelSize(tv.data,getResources().getDisplayMetrics()); } ref: How to get the ActionBar height?...

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

wpf,xaml,height,border

Use a Grid instead of a StackPanel then the border will stretch to the Grids height and width on resizing <Grid x:Name="STP" Margin="10"> <Border x:Name="STPB" BorderBrush="#FFE80707" BorderThickness="5" CornerRadius="10" /> </Grid> Window after your changes, Looks like the same after reize (make smaller) without your changes. http://i.stack.imgur.com/SplMn.jpg...

Position div below other div, except when height exceeds

css,height

You could use CSS3 columns and remove your floats, e.g. http://jsfiddle.net/ossym8zr/2/ .outer { height: 400px; width:100%; background-color: yellow; -webkit-columns: 3; -moz-columns: 3; columns:3; } .element { margin: 0 0 20px 0; width: 33%; } When no room is available on a column, the next list will be placed in the...

Using the height() method in jquery

javascript,jquery,html,jquery-animate,height

I would try to print $("#thing").height() in the browser console with console.log($("#thing").height()); to see what is returning from the div. I also noticed that .height() has some problems with absolute positioned divs given a display:block; style....

How to set 100% height on a sidebar div?

html,css,position,height,sidebar

So try this and see if it works. I tried it on my computer and it works great. menuIzquierda { margin-top: 25px; float: left; background-color: #333333; position: fixed; width: 20%; top: 0px; bottom: 0; left: 0; } So the position: fixed will lock it in place and then the top:...

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

animation,height,collectionview

I found this workaround to avoid this undesired behavior on this Github page. The trick is done by changing the height of the CollectionView before running the animation and setting it back to the original value on the completion block of the performBatchUpdate Method. This is what the code could...

Surface view and scaling

android,height,scale,surfaceview,weight

It happens cause Your display height more than View height. Try to use surfaceView.getHeight() instead of interfaz.getHeight(). Also You can use requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN); in Your Activity before setContentView() to make Your game fullscreen....

jquery accordion get height value

jquery,height,jquery-accordion,value

you can use $('#activePanel').outerHeight(true); if you have multiple accordions give all the same class and use .each(); $('.Panels').each(function(){ var actualHeight = $(this).outerHeight(true); console.log(actualHeight ); }); ...

How to automatically set different item height in ExpandableListView?

android,height,expandablelistview

Thanks all for answers. The solution is use RelativeLayout instead LinearLayout: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:layout_width="50dp" android:layout_height="50dp" android:id="@+id/noticeImage"/> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_toRightOf="@+id/noticeImage"...

How to vertical space filling?

android,xml,height,android-linearlayout

You can wrap the 5 LinearLayout of the buttons into a LinearLayout parent and give it a weightSum of 5. Than you can give each of those linearLayout a weight of 1 and change the height of buttons in match_parent: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <!-- PANTALLA DE RESULTADO...

input height different in ios

html,ios,css,height

Try to use box-sizing: border-box; and same heights for both inputs.

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

css,resize,height,width,percentage

Any percentile value is relative to the size of the viewport. Viewport Height (VH) and Viewport Width (VW) are also relative. If you want to ensure your elements are always the same size, use an EM value.

CSS same height as Parent

html,css,image,height

Since the element is an overlay (as the name implies), i'd suggest relatively positioning the parent and then absolutely positioning the overlay relative to it: Example Here .data { width: 95%; margin: auto; position: relative; } .data .overlay { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }...

'Greater than' some value in height()

jquery,css,height,document

.height() returns a Number. Compare it with a number, cause 1000px is not a Number and "1000px" cannot be compared with a number without parsing. var docH = $(document).height(); // returns a Number if (docH > 1000){ $('#colorpicker').click(function(){ $('.colorss').css('top', 500); }) } Also , I'm not sure if you want...

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

ios,xcode5,xcode6,height,navigationbar

You need to add launch image assets for the iPhone 6 and iPhone 6 Plus. This is a really good answer on how: Enable Native Resolution on iPhone 6 and 6 Plus

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

css,inheritance,height

Set the content div min-height: 400px; (replacing height) So it will never be smaller than the container but can get larger as necessary.

Equalize height of two div with same parent in CSS

html,css,height

No need for Javascript, you're right, it's a simple css trick. Wrap both the content and the navigation into a div, to which you will give the color of the sidebar (in this example, grey). Set the content div to white and with a display:inline-block. HTML <div id="innerwrapper"> <div class="sidebar">...

How to make all divs same height, based on text content?

html,css,list,height

As far as I know this cant be done with CSS because these elements are not siblings. If the structure was different you could make set them to display: table-cell and they would adjust to each other. The only way I beleive this will work in its current markup is...

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

javascript,image,object,height,width

Sounds like your image hasn't loaded yet when you get its width or height. Then it will be 0. When you refresh, the image is in your browser cache and will load immediately so its width and height are available straight up. Use the onload() event of the Image object...

Swift tableView view height equal to amount of cells

xcode,uitableview,swift,height

1 approach could be set some autolayout constraints on the UITableView itself. For example, if you want to position a UIButton underneath your tableview, then you can go into your Storyboard and set the "vertical spacing" between the bottom of the TableView and the top of the Button to be...

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

javascript,jquery,height,margin

Use $("#element").outerHeight(); or $("#element").innerHeight(); according to your requirements....

div height 100% with header and footer - no tricks

html,css,twitter-bootstrap,css3,height

I have to say I'm not a fan of this.. but this is the only CSS solution I know.. http://codepen.io/pacMakaveli/pen/EjWXNw?editors=110 Otherwise, for a cleaner way, use flexbox. html, body { height: 100%; } #wrap { height: 100%; display: table; width: 100%; border: 2px solid green; } #wrap > nav, footer...

get height of dom element after using get(index)

jquery,height

use eq() var height = $("#rows").children().eq(index).height(); or var height = $("#rows").children().get(index).clientHeight; NOTE: get() will be converted to javascript object so there is no height() method in javascript ...

Hot to set weight for width and height?

android,view,height,width,android-layout-weight

For example, I have the below layout: <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/ll_forImage" android:layout_width="match_parent" android:layout_height="wrap_content"> <ImageView android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> <LinearLayout android:id="@+id/ll_forList" android:layout_width="match_parent"...

Set ListView height for device height

android,listview,android-listview,height

to listView add; android:layout_height="0dp" android:layout_weight="10" and to LinearLayout with buttons, add; android:layout_height="0dp" android:layout_weight="1" ...

jquery jScrollPane too small viewport

javascript,jquery,height,jquery-jscrollpane

Apparently to solve this issue, you have to modify the css of #container-of-the-table. This is the right code: #container-of-the-table{ overflow:auto; max-height: 165px; height: auto; } I am glad that my answer was helpful!...

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

html,css,css3,position,height

Ok. I understand what you are trying to do. This is what you are looking for. Answer has been tested on fiddle and code is below for your convenience. The issue you are having is that the body html element is everything. The HTML element is just the visible space....

3 columns same height

html,css,height

in your .columnLayoutclass add a min height property e.g.min-height:200px; so that all the container should have a minimum height and if your content within these blocks is more than they will adapt to the new height.

Set SVG height and width to that of the node inside it

html,css,svg,height,inline

I'm not aware of any SVG+CSS solution. You could use some JavaScript to adjust the size: // get the bounding box for the text element var bbox = text.getBBox(); // set the svg width/height accordingly svg.setAttribute( 'width', bbox.width ); svg.setAttribute( 'height', bbox.height ); // set the viewbox accordingly svg.setAttribute( 'viewBox',...

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

java,android,height,width

You are doing this widthtext.setText(width); heighttext.setText(height); outside of your listener so naturally it doesn't have the values yet. Move them inside layout.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() { @Override public void onGlobalLayout() { width = layout.getWidth(); height = layout.getHeight(); // move here widthtext.setText(width); heighttext.setText(height); } }); } As blackbelt pointed out in a comment,...

How much a window is resized in jQuery?

jquery,css,google-chrome,resize,height

I guess you are testing in chrome for mobile. Chrome hides the nav bar and shows it when you scroll in one direction, when he thinks that you may want to have access to it. when you are working with percentage heights this can be very annoying, I agree with...

CSS increase width only if max-height reached

jquery,css,height

If you're allowing jQuery, you could do something like this: $(document).ready(resizeWidth()); //call function when page is loaded $(window).resize(resizeWidth()); //call function when page is resized function resizeWidth(){ var maxHeight = $('.container').eq(0).css('max-height'); maxHeight = maxHeight.split('px')[0];//remove px var cWidth = $('.container').eq(0).width(); var currHeight = $('div.container')[0].scrollHeight; while(maxHeight < currHeight) { cWidth += 100; $('.container').eq(0).css('width',...

How to provide default font height or content when

or has no characters?

javascript,html,css,text,height

Question 2 The width behavior of p versus span is due to the CSS specification for the width property. width does not apply to non-replaced inline elements (span), so p being a block level elements, takes on the width value. Note that, if you apply display: inline-block to a span,...

flexbox height or big image background

windows,height,flexbox

To make a div fill the site using flex box, you need to do the following: <body> <div id="mainWrapper"> <div id="headerWrapper"> <!-- HEADER CONTENT HERE --> </div> </div> </body> with the following CSS html, body { margin: 0; padding: 0; height: 100%; } #mainWrapper { display: flex; flex-direction: column; min-height:...

Elements disapear when height is relative

html,css,css3,height,width

That's because your a tag is empty. If you want it to grow with it's content you need to give it some content (background is no content). You could add the image you want with an img tag inside. <a class="twitter"><img src="url(http://ow.ly/IPVSe)" alt="Twitter /></a> And in your .css file: .social...

Resize a TLayout according to the number of labels in Firemonkey

layout,resize,height,firemonkey,tpanel

I just submitted the following as a bug report. In the meantime I would suggest you calulate the bounds yourself, maybe even starting with the code below: The documentation for FMX TControl.ChildrenRect states: "Specifies the rectangle area occupied by the current control's children. ChildrenRect is a rectangle obtained by performing...

Set height of an image same as a neighboring element CSS

css,image,height,element

In order to style neighboring elements in CSS you can use adjacent selector(plus sign). As in following: label + img{height:300px} That will target img in your code "after" any label. JSFiddle...

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

html,css,css3,height,background-size

Complete solution (with image align to right): .col-left-bg-image { background: url("http://www.mediafire.com/convkey/7a01/xaagjmwa7yz1dgdzg.jpg?size_id=b") no-repeat; background-size: auto 100%; height: 100%; background-position: center right; } FIDDLE: https://jsfiddle.net/lmgonzalves/tpu10dxu/7/...

Empty space after custom eBay description [closed]

css,html5,iframe,height,ebay

I finally found the answer! I had a body onLoad JavaScript function which was interfering with eBay's JS. eBay set the iFrame to 10000px and then adapt it to the correct height once it's identified, however my onLoad function was somehow preventing the script it from setting the height. Rather...

Div with a simple variable height

javascript,html,css,variables,height

<?php $numberOfPurchases = getNumberOfPurchases(); // call the function that queries the database ?> <script> var defaultDivHeight = 10; var purchaseDiv = document.getElementById('purchaseDiv'); if (<?= numberOfPurchases; ?> > 0) { purchaseDiv.style.height = <?= numberOfPurchases; ?> * defaultDivHeight + 'px'; } else { purchaseDiv.style.height = defaultDivHeight + 'px'; } </script> I suggest...

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

android,xml,layout,height,max

The best way I can think of would be to use this layout. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ScrollView android:id="@+id/scrollView" android:layout_width="match_parent" android:layout_height="wrap_content" android:fillViewport="true" android:scrollbarStyle="insideInset" >...

Flexbox: How to Combine percent, pixels and remaining height on columns?

css,height,flexbox,stretch

Use the flex-grow parameter (the first one in the flex shorthand property) : HTML : <div class="grid"> <div class="block a" class=a>block height 50px</div> <div class="block b">block height 25%</div> <div class="block c">block height *</div> <div class="block d">block height 50px</div> </div> CSS : .block { outline: solid 1px black; } .a, .d...

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

html,css,alignment,height

Since both #imageBox and #textContainer are inline-block elements, you can use #imageBox, #textContainer { vertical-align: middle; } Currently you are using it on #image, but it has no effect because #image is a block element. You should use it on #imageBox instead. .full { width: 100%; height: 100px; background-color: yellow;...

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

javascript,jquery,css,height

Try the following style for the last div <div class="bottom-section grid-45 mobile-100" style="display:table;height:100%;"> // THIS SECTION NEEDS HEIGHT TO ALWAYS STRETCH TO FOOTER <div class="cta"> <!-- DYNAMIC TEXT --> </div> <div class="button"> </div> ...

div doesn't resize height enough

html,css,height

Change height: 100% to min-height: 100%... #pageContent{ padding:30px; min-height: 100%; background:#fff; } Demo height: 100% will restrict the height to the height of body. min-height will allow your element to expand beyond if necessary....

Jquery Tumblr Each() Solution?

javascript,jquery,height

If I my understanding of your question is right, this should work. I assumed that .Photos > a > #HoverImg:last-child comes inside each .index-page .Photos a img . function HeightCalc(x, n) { $(x).each(function() { var Calc = ($(this).height() + 50) / 2; // Calculate height of images $(this).siblings(n).css({ "bottom": Calc...

Relative Element with auto-height

html,css,height,css-position

There is another option to do this update css for .table .table { position: relative; display: block; overflow:hidden; } and remove height of .content jsfiddle: http://jsfiddle.net/d5jdu9md/ #content { position: relative; background: red; z-index: 1; right: 0px; width: 100%; color: rgba(58, 58, 58,1); } #content p, #banner p, #content a{ margin:...

How to make objects a percentage of the width of another

javascript,jquery,height,width

just put $(document.body).innerWidth()-3; instead of $(window).innerWidth()-3; and you'll be fine. this is because the body element has margins and it's set by the browser, yes you can reset the margin of the body to 0px but why not we get more accurate and calculate the body. here is the edited...

iOS 8.3 - UITableView cell height bug

uitableview,height,constraints,ios8.3

I have found out what was going wrong. Before the iOS 8.3 update the table view should somehow auto calculating the height of the custom cell and everything was working properly. My mistake was that i believed that i had correctly connect the table view's data source and delegate at...

How to get the correct Image height and width

c#,image,height,size,width

You can and must declare a ImageSize you want to have, before you load the Images into the ImageList: _tabControlImageList.ImageSize = new System.Drawing.Size(20, 16); Afterwards all your Images inside the ImageList will have following size: 20x16px....

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

javascript,jquery,height,width

I believe you must be mistaken. Can you provide a demonstration where jQuery is returning a percent value for .width or .height?

Picturebox Height/Width using textbox…How?

textbox,resize,height,picturebox,weight

You'd rather affect the a variable to the Height property of your image: private void button_Click(object sender, EventArgs e) { int a = int.Parse(textbox1.Text); PublicImage.Height = a; } ...

How to change random element heights

javascript,jquery,random,height

Simply check if there are more li elements in the list than the current value of i and if there are, update the corresponding element instead of creating a new one. var i=0; while( i++ < 100) { if ($('#container > li').length > i - 1) $('#container > li').eq(i -...

Setting div 100% of window without content overflowing

html,css,layout,height

If you have a "full-sized" container that you want to always match the height of the viewport - you're best not to add content that will overflow (go beyond) that div, as you're essentially defeating the purpose. Short answer: Remove height: 100%; from your .container CSS rule. I've created a...

How to make image stretch to a specific paragraph?

html,css,image,user-interface,height

How I solved this issue was I realized that by definition, a div is a block element that "will expand naturally to fit its child elements". So going off that, I played around with the css width and height attributes and found a height that would cause the image to...

racket: maximum height of a binary tree

tree,binary,height,racket,distance

We only need one function - maxdepth, and we only have to find the max of each subtree plus the height of the current node: (define (maxdepth tree) (cond [(null? tree) 0] [else (+ 1 (max (maxdepth (node-left tree)) (maxdepth (node-right tree))))])) ...

height=100% not rendering the google maps api

javascript,html5,css3,google-maps,height

The reason why 100% doesn't work is because the map needs to send you images at a specific ratio (fixed width & height). Now I might be guessing here, but that's what I think happens. Since I had a similar problem, where my map was hidden inside a tab, I...

Chrome applies height property of media query only on refresh

css,google-chrome,height,media-queries,refresh

If, as you say, this problem is only encountered on chrome when you resize the window, it is most likely a problem with Chrome rather than your code.

Make div height equal to its parent (100%)

html,css,height

You could try using a table layout: set display:table on the parent set display:table-cell to the childs that need the same height #container { position: relative; width:600px; border: 1px solid red; display:table; } #content { display: table-cell; background-color:pink; width:400px; } #side-bar { display:table-cell; background-color:yellow; width:170px; padding-left:25px; vertical-align: top; } here's...

CSS3 height:75% doesn't want to work

html,css,css3,twitter-bootstrap,height

The browser doesn't know what 75% of height is without the parents having their height defined, in this case, you need to give an height to their parents. So your CSS, needs to have the following: html { height:100%; } body { height:100%; } .container { height:100%; } .hidden-scrollbar {...

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

swift,height,row,tableview,cell

You will need to put all the content of table view cell in a single view (lets call it MainView) and set MainView top, leading and trailing edge constrains to container view. Also set a height constraint less than or equal to 60 with required priority. After that put your...

Parent Element does not fill on Hover State

html,css,hover,height

what about this instead? http://jsfiddle.net/q43co9tk/7/ just use display table and table-cell .headeractions{display: table;} .requestheader{display: table-cell;} .socialheader{display: table-cell;} ...

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

jquery,html,css,height,html-table

What you need is basically to exclude the inner table from the document flow, that can be achieved using absolute positioning: table { border-collapse: collapse; } table, th, td { border: 1px solid black; } #test { overflow-y: scroll; position:absolute; top:0px; right:0; left:0; bottom:0; } <table style="width:100%"> <tr> <th colspan="4">This...

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

html,css,asp.net,html5,height

I think I understand what you're asking, but I'm not completely sure, nor am I sure where the DOCTYPE, anchors or ASP.NET come into play. Here's a demo of a full page document, with a few full screen child divs. html, body { height: 100%; width: 100%; } body {...

getting iframe height inside jQuery tabs returns 0

jquery,iframe,tabs,height

You can use jQueryUI's callback to get the iframe height once the tab is loaded: $( ".selector" ).tabs({ activate: function( event, ui ) { calcHeight(); } }); http://api.jqueryui.com/tabs/#event-activate...

UIButton height unintentionally increased - Widget - iOS 8

ios,uiview,uibutton,height,ios8-today-widget

Oh urmmm... ok I literally just fixed this issue by doing the following: So I basically got rid of the vertical resizing property on the UIView which contains the UIButtons and its fixed.... I must admit, this is odd though because since I want the view to resize (to the...

jQuery height() of div incorrect on orientation change

jquery,mobile,resize,height,orientation-changes

well, I guess my question is just too hard for the internet. I ended up just writing a function that would calculate all the values that I needed on window load, for both portrait and landscape mode. Then on orientation change i would just grab those values instead of recalculating...

how to fit content in browse height

jquery,html,css,window,height

It seems to me that the padding added to the topbar is what is appending the extra pixels so just take out the padding or change it up to your fit .topbar { background-color: #1f1f1f; border-top: solid 3px #0b0b0b; width: 100%; min-height: 56px; position: relative; z-index: 2; } JSFiddle...

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

html,css,height,overflow,scroller

What you need to do is make 2nd column's position absolute, so its height is relative to parent's. If the 1st column's height grows, 2nd column will follow accordingly. If the 1st column's height is shorter than 2nd column's, 2nd column will keep parent div's height, which is 150px by...

Auto-adjust image height depending on textbox

html,css,image,height

If you are not concerned about image aspect ratio which is obvious from what you asked, you can try this: CSS: html, body { width:100%; height:100%; } .container { font-size:0; border:1px solid red; display:table; } .container>div { display:table-cell; width:50%; font-size:12px; height:inherit; } .container>div.rhs { background-image:url(http://www.lorempixel.com/600/200/sports/1/); background-size:cover; background-repeat:no-repeat; } HTML: <div...

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

ios,swift,button,height

The reason why you see no changes may be because you're using AutoLayout, and the button has some constraints applied to it, and you need to change the height constraint to accomplish what you want. Edited: Changing frame properties directly seems to be possible in Swift but was not possible...

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

html,css,height

This got resolved by add overflow: hidden; - thanks to Akshay !

How to set width and height in jQuery

javascript,jquery,styles,height,width

To set the width and height for all images, you can use the .width() and .height(). In your case, you'll want the following code for <img> tags: $(img).width(450).height(350) Now, if you're trying to resize background images, you'll need to set CSS styles (duplicate post): $(selector).css({ "-o-background-size": 450px 350px, "-webkit-background-size": 450px...

Stacked flexbox vertical centering not working in chrome

css,google-chrome,height,flexbox

Here is the working scss: .flex-container { display: flex; flex-direction: column; align-items: center; height:100%; .flex-item { flex: 1 1 auto; align-self: center; background:#87BEB7; padding:0 10px; display: flex; &:nth-child(2) { background:#ADBEBC; } &:nth-child(3) { background:#BE8A74; } > div { display: flex; justify-content: center; align-items: flex-start; div { flex: 0 1 auto;...

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

jquery,css,css3,responsive-design,height

I don't know whether this is what you're looking for, and I don't know whether this is a hack. All I did was change the CSS to this: img { display: block; width: auto; height: inherit; } ...

Full height for inner div

html,css,html5,css3,height

The main problem is .mainC .discBody{height:81%}, it gets different height for each box, as their parents have different heights. CSS calc() could help, browser support IE 9 and up. .mainC .title { padding: 5px; height: 30px; box-sizing: border-box; } .mainC .discBody { height: 81%; /* keep this as fallback */...

Why don;t the height and the width of this frame increase?

animation,swift,height,width,coordinates

Check out here the answer: http://stackoverflow.com/a/28029425/1135714 This answer solved my issue....