Questions tagged [alignment]

In GUI (inc. web page) context, alignment refers to the positioning of visual elements. Or for memory addresses, being a multiple of some power of 2.

In GUI (inc. web page) context, alignment refers to the positioning of visual elements. Three possibility of alignment left, right, and center.

In a memory addressing context, alignment is the placement of data or code at memory addresses that are multiples of some (usually small) power of 2, for example having an array start at a 16-byte boundary with C++ alignas(16) int foo[1024];. This means the address will end with at least 4 0 bits.

For this meaning, prefer the tag.

8627 questions
143
votes
17 answers

How to align input forms in HTML

I'm new to HTML and I'm trying to learn how to use forms. The biggest issue I am having so far is aligning the forms. Here is an example of my current HTML file:
First Name:
Last Name:
yoshyosh
  • 13,956
  • 14
  • 38
  • 46
120
votes
9 answers

trying to align html button at the center of the my page

I'm trying to align an HTML button exactly at the centre of the page irrespective of the browser used. It is either floating to the left while still being at the vertical centre or being somewhere on the page like at the top of the page etc.. I…
user1455116
  • 2,034
  • 4
  • 24
  • 48
110
votes
39 answers

datatable jquery - table header width not aligned with body width

I am using jQuery datatables. When running the application, the header width is not aligned with the body width. But when I click on the header, it is getting aligned with the body width but even then there is some light misalignment. This problem…
kishore
  • 1,587
  • 4
  • 15
  • 17
107
votes
11 answers

CSS: Center block, but align contents to the left

I want a whole block to be centered in its parent, but I want the contents of the block to be left aligned. Examples serve best On this page :…
Paul Tarjan
  • 48,968
  • 59
  • 172
  • 213
106
votes
11 answers

CSS way to horizontally align table

I want to show a table of fixed width at the center of browser window. Now I use But Visual Studio 2008 gives warning on this line: Attribute 'align' is considered outdated. A newer construct is recommended. What…
Alexander Prokofyev
  • 33,874
  • 33
  • 95
  • 118
105
votes
6 answers

How to label each equation in align environment?

I wonder how to label each equation in align environment? For example \begin{align} \label{eq:lnnonspbb} \lambda_i + \mu_i = 0 \\ \mu_i \xi_i = 0 \\ \lambda_i [y_i( w^T x_i + b) - 1 + \xi_i] = 0 \end{align} only label the first equation and only…
Tim
  • 1
  • 141
  • 372
  • 590
104
votes
9 answers

HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time?

This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch you…
Scott Bussinger
  • 2,767
  • 4
  • 28
  • 29
101
votes
7 answers

Center an item with position: relative

I've got a menu that appears on hover over an absolutely positioned div. All of the menu items have to be relatively positioned because the absolutely div will appear multiple times on a page and will appear in multiple sizes in one instance. How…
Flippinmonk
  • 1,029
  • 2
  • 8
  • 6
101
votes
3 answers

How to align single widgets in Flutter?

I want to align a Flutter widget within its parent. I know that I can center a widget by wrapping it in a Center widget. Center( child: Text("widget"), ) But how do I align it to the right, bottom, top middle, etc? Notes: I am talking…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
94
votes
9 answers

How can I align text in columns using Console.WriteLine?

I have a sort of column display, but the end two column's seem to not be aligning correctly. This is the code I have at the moment: Console.WriteLine("Customer name " + "sales " + "fee to be paid " + "70% value "…
Stephen Smith
  • 953
  • 1
  • 7
  • 6
92
votes
1 answer

Difference between flex-end and end?

When I use the css property align-items, I cannot see any visual difference with the value of flex-end or value of end. What is the difference between align-items: end and align-items: flex-end?
Sølve T.
  • 4,159
  • 1
  • 20
  • 31
90
votes
8 answers

Can overflow text be centered?

When I specify text-align:center for an element with a width that is greater than the width of the text, the text is centered within the content box of the element (as expected). When I specify text-align:center for an element with a width that is…
Nathan Ryan
  • 12,893
  • 4
  • 26
  • 37
89
votes
7 answers

CSS - Make divs align horizontally

I have a container div with a fixed width and height, with overflow: hidden. I want a horizontal row of float: left divs within this container. Divs which are floated left will naturally push onto the 'line' below after they read the right bound of…
Robin Barnes
  • 13,133
  • 15
  • 44
  • 45
88
votes
7 answers

How to align footer (div) to the bottom of the page?

Can anyone explain how to align a footer div to the bottom of the page. From the examples I've seen, they all show how to make the div stay visible at the bottom, no matter where you've scrolled the page. Although I don't want it like that. I want…
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
88
votes
4 answers

Vertical alignment of text and icon in button

I'm having trouble vertically aligning a font-awesome icon with text within a button under the Bootstrap framework. I've tried so many things including setting the line-height, but nothing is working.