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.

7934 questions
110
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
  • 1,834
  • 4
  • 17
  • 42
101
votes
10 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
  • 32,090
  • 32
  • 91
  • 115
98
votes
8 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,647
  • 3
  • 27
  • 28
86
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
  • 21,793
  • 29
  • 79
  • 126
86
votes
9 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
  • 44,540
  • 54
  • 163
  • 207
85
votes
8 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
  • 11,985
  • 15
  • 41
  • 45
85
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
  • 122
  • 314
  • 481
80
votes
8 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
  • 813
  • 1
  • 7
  • 6
77
votes
5 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
  • 771
  • 1
  • 6
  • 6
76
votes
8 answers

Android: How can you align a button at the bottom and listview above?

I want to have a button at the bottom of the listview. If I use relativeLayout/FrameLayout, it aligns but listView goes down to very botton. (Behind the button at the bottom) FrameLayout:
jclova
  • 4,946
  • 14
  • 48
  • 74
76
votes
8 answers

Center form submit buttons HTML / CSS

I'm having troubles centering my HTML form submit buttons in CSS. Right now I'm using:
Belgin Fish
  • 16,577
  • 39
  • 98
  • 128
76
votes
31 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,179
  • 3
  • 12
  • 17
75
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
  • 11,977
  • 4
  • 24
  • 35
74
votes
8 answers

Align vertically using CSS 3

With CSS 3, are there any way to vertically align an block element? Do you have an example? Thank you.
tho
  • 741
  • 1
  • 6
  • 3
72
votes
2 answers
But I want to use CSS class. I defined class like this way but no luck td { vertical-align: middle; text-align: center; margin-left: auto; margin-right: auto; align:…
MonsterMMORPG
  • 20,310
  • 69
  • 183
  • 306