Top "Layout" questions

The layout tag is for questions about the placement, alignment and justification of objects with respect to a containing element.

Truncating long strings with CSS: feasible yet?

Is there any good way of truncating text with plain HTML and CSS, so that dynamic content can fit in …

css text layout cross-browser truncate
How to make an inline-block element fill the remainder of the line?

Is such a thing possible using CSS and two inline-block (or whatever) DIV tags instead of using a table? The …

css layout fixed-width
Android: How to stretch an image to the screen width while maintaining aspect ratio?

I want to download an image (of unknown size, but which is always roughly square) and display it so that …

java android layout
Android Dialog: Removing title bar

I have a weird behavior I can't pinpoint the source of. I have my app with the classic requestWindowFeature(Window.…

android layout dialog
How to retrieve the dimensions of a view?

I have a view made up of TableLayout, TableRow and TextView. I want it to look like a grid. I …

android layout android-widget lifecycle measure
Remove background drawable programmatically in Android

I want to remove the background drawable @drawable/bg programmatically. Is there a way to do that? Currently, I have …

android layout background
Android: why is there no maxHeight for a View?

View's have a minHeight but somehow are lacking a maxHeight: What I'm trying to achieve is having some items (views) …

android layout view autoresize
Using a custom typeface in Android

I want to use a custom font for my android application which I am creating. I can individually change the …

xml android layout fonts
How to prevent long words from breaking my div?

Ever since switching from TABLE-layout to DIV-layout, one common problem remains: PROBLEM: you fill your DIV with dynamic text and …

css layout html
Simple way to change the position of UIView?

I change the position of a UIView with following codes without changing size of the view. CGRect f = aView.frame; …

ios layout uiview frame cgrect