Top "Layout" questions

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

How do you keep parents of floated elements from collapsing?

Although elements like <div>s normally grow to fit their contents, using the float property can cause a …

html css layout css-float clearfix
Android: How to Programmatically set the size of a Layout

As part of an Android App I am building a button set. The buttons are part of a nested set …

android layout resize android-linearlayout
How do I center an SVG in a div?

I have an SVG that I am trying to center in a div. The div has a width or 900px. …

css layout svg positioning margin
How to get controls in WPF to fill available space?

Some WPF controls (like the Button) seem to happily consume all the available space in its' container if you don't …

wpf user-interface layout
How to style a div to be a responsive square?

I want my div to adapt its height to always equal its width. The width is percental. When the parent's …

css layout responsive-design aspect-ratio
What's the difference between fill_parent and wrap_content?

In Android, when layout out widgets, what's the difference between fill_parent (match_parent in API Level 8 and higher) and …

android layout user-interface
Set the absolute position of a view

Is it possible to set the absolute position of a view in Android? (I know that there is an AbsoluteLayout, …

android android-layout layout view position
Add space between HTML elements only using CSS

I have several same HTML elements going one after another: <span>1</span> <span>2</…

css layout receipt
Fill remaining vertical space with CSS using display:flex

In a 3-row layout: the top row should be sized according to its contents the bottom row should have a …

css layout flexbox
How can I dynamically set the position of view in Android?

How can I change the position of view through code? Like changing its X, Y position. Is it possible?

android layout view