Questions tagged [center-align]

Specifies the horizontal alignment of the content (eg: text) inside an element (eg:

)

Specifies the horizontal alignment of the content (eg: text) inside an element (eg: )

71 questions
310
votes
14 answers

How to center an iframe horizontally?

Consider the following example: (live demo) HTML:
div
CSS: div, iframe { width: 100px; height: 50px; margin: 0 auto; background-color: #777; } Result: Why the iframe is not centrally aligned like the…
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
155
votes
11 answers

Centering controls within a form in .NET (Winforms)?

I'm trying to center a fixed size control within a form. Out of interest, is there a non-idiotic way of doing this? What I really want is something analogous to the text-align css property. At the moment, I'm setting the padding property of the…
user47741
  • 2,905
  • 4
  • 21
  • 14
67
votes
14 answers

Flutter - FloatingActionButton in the center

Is it possible to make the FloatingActionButton in the centre instead of the right side? import 'package:flutter/material.dart'; import 'number.dart'; import 'keyboard.dart'; class ContaPage extends StatelessWidget { @override Widget…
rafaelcb21
  • 12,422
  • 28
  • 62
  • 86
51
votes
14 answers

Align a div to center

I want to float a div to center. Is it possible? text-align: center is not working in IE.
ACP
  • 34,682
  • 100
  • 231
  • 371
23
votes
6 answers

Is it possible to have a table in the center in a GitHub gist Markdown?

Is it possible to have a table in the center in a GitHub gist Markdown? If so, how? I've used the following syntax to create a table on a Markdown file: Somehow the table is always flushed to the…
alvas
  • 115,346
  • 109
  • 446
  • 738
16
votes
4 answers

Center Align title in action bar using styles in android.

Hi I am developing android application. In my application I am using action bar. I want to make center align my title of window in action-bar. I know it is possible using xml files. but I want to do it using style so that it will applicable for my…
nilkash
  • 7,408
  • 32
  • 99
  • 176
13
votes
4 answers

android center align the selected tab in tablayout

I am using android support design tablayout. Here's my code:
10
votes
3 answers

how to center align a button in a hbox in flex?

I have a VBox inside which I have 4 HBoxes. The second level HBox is initially hidden. When I click the label, 'Show more Options', the second level HBox is displayed. Now I have the space occupied by the 'second level HBOx' empty and the 'search'…
Angeline
  • 2,369
  • 22
  • 68
  • 107
10
votes
2 answers

Print data frame with columns center-aligned

I would like to print a data frame where the columns are center aligned. Below is what I have I tried, I thought printing the data frame test1 would result in the columns being aligned in the center but this is not the case. Any thoughts on how I…
Glen
  • 1,722
  • 3
  • 18
  • 25
7
votes
2 answers

aligning angular material card in center of the page

I made a Registration script which allows user to Sign Up to my site. Now the problem I am experiencing that the angular material card, in which the sign up interface lies, isn't at center. I've tried many things including
and…
Puru Vijay
  • 109
  • 1
  • 3
  • 12
6
votes
1 answer

how to center text of a JSpinner

My question is self explanatory: how to center the text of a JSpinner? the methode setHorizontalAligment is not there. I also tried setAlignmentX, still nothing... Any help would be appreciated c:
user3342795
  • 105
  • 3
  • 6
4
votes
3 answers

Horizontally centering tabs in Material-UI AppBar with ReactJS

I'm building a React App with Material-UI and can't figure out how to center the 3 tabs within the blue AppBar. Currently, they are all left-aligned, as such: https://i.imgur.com/MjQIuBl.png (can't embed images yet, my apologies) Here is my…
Zach Brown
  • 53
  • 1
  • 1
  • 4
4
votes
2 answers
4
votes
1 answer

Button not center align in Safari

Button not centered align in Safari browser only. JSFIddle HTML
CSS .center-block { display: block; margin-right:…
Junaid
  • 2,572
  • 6
  • 41
  • 77
3
votes
1 answer

Align the content of a TextField, but keep its width x height

In a card game I use a TextField in the middle to display the playing table number, but also to detect if a playing card has been played - using myTextField.hitTestObject(myCard) - which means the TextField's position and dimensions may not…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
1
2 3 4 5