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
2
votes
1 answer

Left-aligned text at viewDidLoad instead of center with custom font

I'm using a custom font on an iPhone app. This font is used on UIButtons and is displaying well. In IB, I'm setting up horizontal alignement to center and changing the font programaticly with : [self.playButton.titleLabel setFont:[UIFont…
choomz
  • 135
  • 11
2
votes
1 answer

OpenGL ES 2.0: Better to pad texture pixels rather than use tightly packed data?

I've just seen a texture example which contains the code: GLubyte pixels[4 * 3] = { 255, 0, 0, // Red 0, 255, 0, // Green 0, 0, 255, // Blue 255, 255, 0 // Yellow }; // Use tightly packed…
KomodoDave
  • 7,239
  • 10
  • 60
  • 92
2
votes
1 answer

Display: inline-block text overflow causing alignment issue

I have this problem that always occurs when I'm using display: inline-block to display div's in line one by one. What happens is, when the text is bigger than the div and has to go onto a new line the following div's position/alignment is sort of…
daniel blythe
  • 946
  • 2
  • 16
  • 44
2
votes
1 answer

jqzoom flyout alignment with mobile safari (ipad)

I have jqzoom all setup and everything works great except a couple things, one being even though I tell jqzoom to align the flyout image to the right of the original image, on our ipad it puts the image on the left. Does anyone know the workings of…
Keith DC
  • 661
  • 1
  • 9
  • 24
2
votes
1 answer

C++: Is there ever a reason to make alignof > sizeof for a type

As indicated in this question, it is possible to have alignment greater than size for a type, you just can't make an array of it. However you can make an array of char[alignof(T)] and reinterpret_cast to insert elements there. So the question…
metamorphosis
  • 1,972
  • 16
  • 25
2
votes
2 answers

UITableView with text that is both right-aligned and indented

I wanted to make a UITableView with text that is both right-aligned and indented as depicted in the image below: Unfortunately, I can not do this by writing :- cell.textLabel.textAlignment = UITextAlignmentRight; cell.indentationLevel = 10; // or…
tipycalFlow
  • 7,594
  • 4
  • 34
  • 45
2
votes
1 answer

Aligning views across stacks when nested (within a overlay, background, or ZStack)

A typical problem in SwiftUI is aligning two texts with their baselines in different VStacks, when the content of these VStacks differs in height. Apple has a nice article on how to solve this problem with a custom alignment guide. However, this…
Mischa
  • 15,816
  • 8
  • 59
  • 117
2
votes
3 answers

Easiest way to align text in a table cell

I know very little html and pretty much no css. I would like to know the easiest way for me to change my left aligned text to center aligned within the cells. Someone on stackoverflow helped me to figure out how to center a table on my wordpress…
Jack Stevens
  • 389
  • 1
  • 4
  • 8
2
votes
1 answer

How to properly align a multiline text in a JButton?

I am trying to figure it out how to align some text in a JButton, but it seems to be more challenging than I thought it can be. In some ways I have tried to use HTML and JLabel, but had no luck with it. What I am trying to do, I want to simulate a…
seened
  • 33
  • 4
2
votes
2 answers

.net dropdownlist align text

I am trying to align the text in my .net dropdownlist to the right. Using CssClass I am able to align text to the right in Firefox. IE doesn't not align text to the right it aligns to the left. I have read that IE 6 doesn't support this. Is this…
Dedrick
  • 187
  • 1
  • 11
2
votes
1 answer

In a grid of ggplot patchwork/cowplot/etc., how to align *only the outer boundaries* of the plots?

I have several plots with lengthy legends: (example plot using iris, NOT my actual plot) library(tidyverse) library(patchwork) theme_template <- theme_classic() + theme( # add border all around plot panel.border = element_rect(colour =…
ErwinTATP
  • 162
  • 6
2
votes
3 answers

Anchor button label not aligned

I can't seem to align the label of an anchor tag that's been made to look like a button. Cancel label is clearly off. I would like it to be aligned with the Next button's label. We need the Cancel button to be an anchor tag because this site needs…
AdamT
  • 6,405
  • 10
  • 49
  • 75
2
votes
1 answer

position multiline left-adjusted axis.text centrally under tick

I have multi-line x-axis labels, which I want left-adjusted within the label (so that the left side of both lines is at the same indentation), but centrally positioned under the axis tick. if I use theme(axis.text = element_text(hjust = 0)), the…
swhalemwo
  • 107
  • 7
2
votes
2 answers

How can I group RAM variables to prevent padding with Gnu compiler toolchain?

We have a substantial embedded project using the ARM Cortex M33 processor, written in about 30,000 lines of 'C'. We use the Gnu compiler/linker toolchain. There is a mix of custom software, some open source libraries (e.g. - FatFS), and…
user2246302
  • 386
  • 4
  • 11
2
votes
1 answer

Flex - Vertically position children of a horizontal HBox

I have a custom HBox as so.... public class MyBar extends HBox { public function MyBar() { super(); this.height = 65; this.percentWidth = 100; var newButton:Button = new Button(); //..... newButton.y = 20; var spacer1:Spacer = new…
adam
  • 22,404
  • 20
  • 87
  • 119