Questions tagged [alignment]

3

votes
1

answer
55

Views

Is the address of malloc + size_t * 3 aligned for any type?

I'm builing a kind of dynamic array (vector), but instead of embedding the data (typically void *) into a struct vector, I'm reserving space for a struct vector + a chunk of bytes, an example using an array of size_t's: #include #include struct vector { size_t capacity; size_t typesize; size_t siz...
Keine Lust
1

votes
2

answer
101

Views

Aligning div to baseline of the first line of another div?

I've got two divs and would like to align their baselines. However, one of the divs has more than one line of text and some embedded content, and while I'd like to align them to the top baselines, the browser seems to align to the bottom one. I've built a JSFiddle here to illustrate, with the follo...
Jason Cooper
1

votes
2

answer
2.1k

Views

align-content: center not working in Chrome

I am trying to vertically align divs with flexbox, by using the align-content: center. It works fine in Firefox and IE, but it does not vertically align in Chrome. In Chrome the divs stays on top. Title Text. Title Text. Title Text. And CSS: .products-wrapper { width: 100%; min-height: 100vh; /* FLE...
Nifel
1

votes
1

answer
41

Views

Resize outer-div (relative pos) min-height to height of inner-div (absolute pos)

I'd like to have a couple of divs that are at least the height of the viewport. .fullheight { position: relative; min-height: 100vh; } Each of those contains other divs and in case the content is taller than the viewport-height, the fullheight div should grow. While that works well if the content d...
dan
1

votes
3

answer
48

Views

How can I align divs correctly to fit page width without overflow?

Okay so I am playing around with flex box, I have created this simple layout of divs but I am evidently formatting them wrong. I have put a div at the top for 100% so you can compare where the divs end. Is there a way to align the divs to fit the page? I thought that simply adding some % width stat...
Shayrapet
1

votes
2

answer
70

Views

Line before and after text not responsive

I am trying to have a line before and after my text but I want it to be responsive and currently the only way I can find is by using width... so its not responsive. I would prefer to use before and after psuedo elements only but if its not possible then I am find with another approach. HTML: Testing...
HeelMega
1

votes
2

answer
31

Views

Alignment of multiple (non-biological, discrete state) sequences

I have some data that describes an ordered set of discrete events (or states). There are 34 possible states, which may occur in any order and may repeat. Each sequence of events can contain any number of events, and crucially there are more than 2 sequences of events. My eventual aim is to cluster t...
TJC
0

votes
0

answer
4

Views

Flutter - How to align selected item from DropdownButton?

I am unable to align the selected item from DropdownButton to the center. I have tried child: Center() under the DropdownMenuItem, it is able to align those items however after I have selected one of the items, the selected item was aligned to the Left immediately. I would also like to align the sel...
speedlight
1

votes
4

answer
35

Views

How do I make my right-side margin equal on all resolutions?

I have a short unordered list. I basically just want to shrink the right margin so the borders don't contain the entire page. In my current resolution, I have the right margin set to 35em. This works when my window is minimized, but when I go back into fullscreen (1920x1080) the right margin is too...
Chris Lallo
1

votes
3

answer
42

Views

How to start a new line with a particular item with Flexbox?

This is a very simple exercise but I can't seem to find a neat way to solve it (just started learning about HTML and CSS). I need the 5th block ('bloque 5') in red to be under the other four using Flexbox. The result should be: Could somebody help me with this, please? This is what I have so far: di...
Carolina Zhou Lin
1

votes
1

answer
38

Views

Logo and Nav Alignment From The Bottom of the Logo

I'm making a website that has the logo and a 'home' button on the left side, and 'products' 'about us' 'contact us' on the right side, the home aligns to the bottom of the logo instead of the top of the nav. When I write 'nav a{ position: absolute;' it affects all of the nav attributes, but it fixes...
Theo Brundin
1

votes
1

answer
50

Views

How to ensure empty span matches height of sibling

On codepen I'm testing some frame classes on span button input and an empty span. In order to ensure the empty span matches the height of the others I'm using calc math give it min-height but this calculation seems to require knowing line-height. Is there a way to ensure the min-height without needi...
ryanve
1

votes
1

answer
316

Views

Boostrap 4 card card-img-bottom not working inside tab-pane

I have an Issue with nav-tabs inside the card of a Bootstrap 4 page. What I want to do is swich the card text and also the card-img-bottom simultanously when swiching the nav-link option. So I use a tab-pane that contains both the text and the image to display. The switching works fine for the text...
StackIsCool
1

votes
1

answer
799

Views

formatting the dollar sign and the decimal alignment

Hi I'm new to python and have been playing around on python for a while but I still can't get the dollar sign and the decimal to align. cost=pack*price discount= cost * dis #the percent discount amountdue = discount + cost #how much they owe print(format('Total $', '13'), format(cost,'6.2f')) print...
Jenny
1

votes
1

answer
290

Views

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 tried selecting the scrollArea and chaninging vertical...
Acidic
1

votes
2

answer
39

Views

Paragraph aligning and box issue

I'm looking for a cool 'boxy' effect on my website. I managed to get two boxes on the same line, but, unfortunately, my display: inline-table, I believe, prevents me to give that effect. EFFECT DESIRED: I want the text blocks to be in two columns but I don't want them to be line by line like they ar...
Miloertas
1

votes
0

answer
167

Views

Javafx gridpane margin with columns

I'm using a gridpane and the second row has 4 columns. Is it possible to align them with the rows that has 3 columns? I've looked around a lot and haven't found a solution for this yet. Here is an image of the visual
Kev5
1

votes
0

answer
37

Views

html5, drag images and drop into right side of Div,images concatenate right-to-left

I want images concatenate right-to-left manner. in following code when i put images into another Div, they are right aligned (dropped image always come to most right).however not in the manner I want.the new image should always come on the left of previous image. please help! owww yes ,one should im...
tursunWali
9

votes
7

answer
30.9k

Views

How to align JLabel-JTextField pairs vertically

What I mean by a JLabel-JTextField pair is a JLabel component followed by a JTextField one, for example, 'Parameter 1: -----' where '-----' denotes a blank JTextField. The problem is, the width of JLabels varies due to the varying lengths of parameter names, so that the starts of JTextFields are not...
skyork
1

votes
0

answer
50

Views

QToolbox change icon alignment

I have a QToolBox, and each tab has an icon. By default, the icon is placed on the left of the tab (just before the text). I would like to place the icon on the right of the tab and the text aligned on the left. Any ideas?
laurapons
1

votes
0

answer
34

Views

C++ set different value with pragma pack runs under the same time

I want to test the performance of a cpp program with different memory alignment. I write down '#pragma pack(1)' and '#pragma pack(8)' in two individual test. I record the running time of both programs to compare the difference. In my imagine, the pack(1) must be slower. However the result is the sam...
Yoyoslx
1

votes
2

answer
36

Views

Lined up elements are a few pixels off

Alright, so I have an input box and a submit button. These are supposed to be lined up, and when the button doesn't have styling, they are. However, when I add style (like change the height and such), they become like 2px off (by this I mean the space of the top of the button is like 2px lower than...
Joshua Sparkel
1

votes
2

answer
94

Views

How to apply LayoutData to elements in a FlexBox?

I have a Label, Input field, Button and 3 Link controls which have to appear in-line on desktop and one below the other on mobile screen, as shown in the pictures below. Desktop: Expected Mobile: I am able to achieve what is expected on the desktop. However when the same is rendered on the mobile it...
Maruthi Revankar
1

votes
1

answer
39

Views

remove padding to the right of input fields

I'm having this flexbox with multiple input fields. However, I cannot get it to look like I want to. Here's the code: .inputSettings { display: flex; flex-direction: row; flex-wrap: wrap; max-width: 750px; } .inputSettings > form { background: red; border: 1px solid yellow; flex: 1; } .in...
skulpt
639

votes
26

answer
1.1m

Views

How to Vertical align elements in a div?

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? testing...
Abdu
1

votes
0

answer
77

Views

CSS select field and text position

I'm developing a multi-platform app using Ionic v1. The problem is with CSS, this is the page that I want to perform in graphical purpose: In particular I want to center vertically the input list in the red circle: I want to align them with the caption to the left. I want also to center vertically...
Alfonso Silvestri
1

votes
1

answer
22

Views

Change text alignment when the text wraps

At the moment, I have a p tag that has it's text center-aligned. The issue is when a block of text with properly placed line-breaks is shown in this p tag it looks wrong. But, when a string is so short it doesn't get a line-break it needs to stay center-aligned to look good. So to me the solution wo...
RudBot
1

votes
4

answer
22

Views

Fitting DIV width to its internal text using width

I'm trying to have multiple pieces of text next to each other and centered on the page. They're currently showing on the left unless the width of the div is changed. How would I make it so that the div matches the width of its contents or is there another way to center this on the page? The HTML is...
helpmeplease
1

votes
1

answer
459

Views

How can i align in D435 by using opencv?

Intel gives example to align RGB camera and Depth(IR) camera, but i need adapt to opencv. the example show only 'align in render', so i can't use them because i will use below function. Mat color(Size(640, 480), CV_8UC3, (void*)color_frame.get_data(), Mat::AUTO_STEP); i need align frame like below s...
PDC
1

votes
1

answer
135

Views

How can be numpy array C_CONTIGUOUS as well as F_CONTIGUOUS

I thought I understand the concept of row-major (C_CONTIGUOUS) and column-major (F_CONTIGUOUS) memory alignment of numpy arrays. I thought that those two flags are mutually exclusive. But then I saw an array where both these flags were set to True. In particular I tried the following commands: b = n...
Tomas Sedlacek
1

votes
0

answer
17

Views

How can I make magnetize alignment

My Game Picture I code a block puzzle game, I have created a board with buttons, I will create some block. Question, When user drag and drop this block in somewhere of the board, the block have to align to exact cells. I don't use and other framework and game engine.
serkanhelvacioglu
1

votes
1

answer
137

Views

Why is my WPF ListView column not right aligning?

In my Explorer view that displays a list of files, I have tried right-aligning the Size column as follows. I have the following resources: FileSizeConverter is just an IValueConverter that converts numeric file sizes into string format with B, KB, MB etc. I then have the following column: This displ...
ProfK
1

votes
2

answer
30

Views

Android Studio: Alignment

I've a problem with alignment a webview and an AdView in Android Studio: What I want to get, is the ad at the bottom and all over it the webview. However, I am not able to resize the webwiev to start from the top. At the moment, the webview is just as big as the website is, as you can see here: htt...
Thomas Späth
1

votes
1

answer
75

Views

How make the middle sharp match the text line. The text is not in the sharp [duplicate]

This question already has an answer here: Flexbox: center horizontally and vertically 10 answers How to Vertical align elements in a div? 26 answers How do I vertical center text next to an image in html/css? 7 answers EDIT : there is others post which answers to my post but I let my post online...
Webwoman
1

votes
2

answer
41

Views

how to place image in the middle of the container and two buttons on bottom

I am new to html and css. My question is how do I place image and two buttons to be sure that they will be displayed together? Look at the image to understand what i mean. Thanks!!!! Height alignment
tetanosu
1

votes
0

answer
25

Views

Vertically Aligment HTML Content Div

I have problems lining up tables within a div I save from word a .doc file like html in order to create a pdf. The problem is when I obtain pdf I get a two columns document. But I don't know where to begin. Code generated by Word. @page WordSection1 {size:612.1pt 792.1pt; margin:36.0pt 3.0cm 36.0pt...
Anita
1

votes
1

answer
570

Views

Align icon with input box with CSS

As you can see, the icon is not perfectly aligned with the input box: I just want the icon to align with the input box and can't use position absolute because then the input box overflows other content. What can I do to make it right? header.toplogo { overflow: hidden; margin-top: 10px; position:...
1

votes
1

answer
43

Views

vertical alignment within bootstrap column

Trying to vertically center the text below. I've tried many of the solutions offered here but none have worked. Text always ends up at top of div. I have tried dozens of solutions. Siding WashSome home maintenance tasks are just right for the do-it-yourselfer, power washing your siding is not one o...
atownsend11
1

votes
0

answer
187

Views

Converting Circular text area to rectangular area for OCR Process - OpenCV C++

I want to convert circular text area to rectangular text area for OCR process.I used logpolar() function of opencv. Sometimes it gives good results but sometimes text seems split into two parts according to text area position on circle. OCR process working good (with Tesseract + OpenCV). But my tex...
Ahmet Anil
1

votes
1

answer
232

Views

How to horizontally align CSS :hover buttons inside a centered parent div?

I can't find a similar problem to this one. I want to have two CSS :hover buttons horizontally aligned in a centered parent div (orange div), but it isn't working. Centering: The cursor-activated area (purple border) expands far beyond the buttons, covering much of the page. How can I format the cu...
logoologist

View additional questions