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
2
votes
3 answers

Tool to verify the optimal packing of all structures in a C program

Is there any tool that could verify the alignment of all structures in a particular set of C files and let us know the improperly packed structures so that proper packing(padding) can be done manually ? Is there any tool that would also do the…
Karthik Balaguru
  • 5,685
  • 6
  • 39
  • 55
2
votes
3 answers

C++ class/structure data member offset as constant expression

Taking offset of a data member is as easy as this: #define MEMBER_OFFSET(Type, Member) \ ((unsigned long)(((char *)&((Type *)0)->Member) - (char *)0)); I want to make this a constant compile-time expression (or use type traits). For example, to…
user405725
2
votes
1 answer

GroupLayout alignment

Why does ... Group horizontalGroup = groupLayout.createSequentialGroup() .addGroup(groupLayout.createParallelGroup() .addComponent(aTextArea) .addComponent(aButton,GroupLayout.Alignment.CENTER)); Group verticalGroup =…
Mae Warren
  • 31
  • 4
2
votes
2 answers

HTML - How to make these divs stay in one line?

I want to have three div elements all in one line. And I want the second one to be scrollable if there are so many elements in it and I want the other two divs on the sides to have fixed widths and I want the div in the middle to take all the space…
2
votes
1 answer

Cannot align items to top in scroll area Qt

In a Qt Widget Application, I'm trying to make the following: My aim is to have a form with a scrollArea with a vertical layout and each item in the scroll area aligned at the top. Unfortunately, it's only staying in the centre shown here: I've…
Acidic9
  • 8,255
  • 9
  • 46
  • 85
2
votes
1 answer

"Accounting" Style Table Cell in JavaFX

Is there a way to create "accounting" style cells in JavaFX tables? By accounting I mean having the dollar sign left-aligned and the values right-aligned in the cell. Here is what that looks like in Excel: Here is what I tried so far: public class…
Clashsoft
  • 10,343
  • 4
  • 37
  • 68
2
votes
1 answer

How to centering button in React Native

I am new to React Native currently learning about the technology. I start create a simple layout with buttons inside it. But my buttons aligned to left, how can I make it to the center ? I've tried to alignItems: 'center and justifyContent:…
kurniawan26
  • 555
  • 3
  • 12
  • 27
2
votes
1 answer

Fixing a clustergram column label misalignment

In the code below I try to highlight a specific column by red. However, the resulting label color bar is not aligned with the labels, as shown in the image. How can I correct this? datdat = randn(5,10); regregnames = {'A', 'B', 'C', 'D',…
user5054
  • 865
  • 5
  • 16
2
votes
0 answers

No reads mapped in proper pairs, in paired-end sequencing bamfile using samtools

I am working with a bamfile of paired-end whole genome sequencing, and want to filter out reads from a specific genomic region that are not mapped in a proper pair (these sometimes indicate a structural variant). I am using samtools, and tried to…
Lisa
  • 21
  • 1
2
votes
2 answers

HTML/CSS3 - Align text issues

i'm trying to align text in center position, but i've some problems with the

element and i cannot understand why.

2
votes
5 answers

I need to center images inside a gallery, nothing works

I bought a wordpress theme named Photographer and I try to show the images centered inside the gallery. I asked on their support forum, and they gave me this code .gallery-item { text-align: center; width: 100%; } But that streches the portrait…
Vlady
  • 21
  • 4
2
votes
3 answers

Aligning floated DIVs in a flexible container

I have a set of left floated DIVs inside of flexible container (part #1), when container is resized in a way that it can't contain all of the DIVs in a single row instead of default behavior (2) I want the rows to be perfectly aligned maintaining…
src091
  • 2,479
  • 5
  • 35
  • 68
2
votes
1 answer

How to get button below div

I've been trying to get this button below the div, but I have no idea what went wrong. The button is supposed to be centered right below the page. I've tried modifying the z-index, changing the CSS so that the button to inline-block, putting the…
RejectEd27
  • 51
  • 9
2
votes
2 answers

CSS - Trouble in positioning content in ::after

Sorry for my bad CSS skills. Problem: I want to add a positive and negative symbol to all elements of a
    using CSS (no images!). First Attempt My solution was to put an empty in the beginning of all
  1. with a "positive" or "negative"…
flen
  • 1,441
  • 1
  • 14
  • 39
2
votes
5 answers

CSS - HTML Lists - center UL in page & left align LI items

I have this code: .menu { margin: auto; padding: 0; list-style-type: none; } .item { width: 60px; text-align: center; font-size: 4em; background-color:red; display: inline-block; margin: 5px; …
ET-CS
  • 4,441
  • 5
  • 32
  • 54
1 2 3
99
100