Questions tagged [vertical-alignment]

Typically a style or other UI definition associated with the placement of an interface item in the vertical plane.

3043 questions
92
votes
7 answers

CSS: How to align vertically a "label" and "input" inside a "div"?

Consider the following code: HTML:
CSS: div { height: 50px; border: 1px solid blue; } What would be the easiest method to put the label and the input in…
Misha Moroshko
  • 148,413
  • 200
  • 467
  • 700
87
votes
3 answers

CSS Vertical align does not work with float

How can I use the vertical-align as well as float in the div properties? The vertical-align works fine if I do not use the float. But if I use the float, then it does not work. It is important for me to use the float:right for the last div. I am…
user1355300
  • 4,577
  • 18
  • 41
  • 69
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
80
votes
7 answers

Vertically center rotated text with CSS

I have the following HTML:
Centered?
div.outer is a narrow vertical strip. div.inner is rotated 90 degrees. I would like the text "Centered?" to appear centered in its container div. I…
danvk
  • 13,227
  • 3
  • 51
  • 86
79
votes
9 answers

Why is vertical-align:text-top; not working in CSS

I want to align some text to the top of a div. It seems that vertical-align: text-top; should do the trick, but it doesn't work. The other things that I have done, such as putting the divs into columns and displaying a dashed border (so I can see…
Ankur
  • 47,089
  • 107
  • 237
  • 309
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
69
votes
16 answers

I want to vertical-align text in select box

I want to vertically align the text in select box. I tried using select{ verticle-align:middle; } however it does not work in any browsers. Chrome seems to align the text in select box to the center as a default. FF aligns it to the top and IE…
user_1357
  • 7,048
  • 11
  • 56
  • 95
69
votes
7 answers

Why is width: 100% not working on div {display: table-cell}?

I'm trying to vertically and horizontally center some content overlaying an image slide (flexslider). There were some similar questions to this one, but I couldn't find a satisfactory solution that applied directly to my specific problem. Because…
timshutes
  • 2,239
  • 3
  • 21
  • 28
69
votes
8 answers

How to display list items as columns?

I'm trying to build my first responsive layout. I want to display list items in a vertical line, depending on width.
  • 1
  • 2
  • 3
  • 4
  • 5
Grozav Alex Ioan
  • 1,449
  • 3
  • 17
  • 26
67
votes
11 answers

Font Rendering / Line-Height Issue on Mac/PC (outside of element)

The Design The info widgets content should be vertically aligned in the middle as such: The Coded Design Windows: Chrome 20 / FF 14 / IE 9 Mac (Lion / Mt. Lion): Chrome / FF The Code HTML
rebz
  • 1,783
  • 3
  • 13
  • 16
65
votes
2 answers

Align text to the bottom of a div

I tried to align my text to the bottom of a div from other posts and answers in Stack Overflow I learned to handle this with different CSS properties. But I can't get it done. Basically my HTML code is like this:
parascus
  • 897
  • 1
  • 9
  • 13
61
votes
3 answers

vertical-align image in div

i have problem with image vertical-align in div .img_thumb { float: left; height: 120px; margin-bottom: 5px; margin-left: 9px; position: relative; width: 147px; background-color: rgba(0, 0, 0, 0.5); border-radius:…
aainaarz
  • 727
  • 1
  • 7
  • 13
60
votes
0 answers

How to vertical align image inside div

Possible Duplicate: How to properly vertically align an image Image size changes but the div size is fixed These are CSS but not working. Is it possible to achieve this without using background feature of CSS. This is CSS class which image is…
MonsterMMORPG
  • 20,310
  • 69
  • 183
  • 306
58
votes
9 answers

DataGrid row content vertical alignment

I have a regular DataGrid from WPF 4.0 RTM, where I put data from a database. In order to make clean & light style of DataGrid I use a tall/high rows and by default DataGrid aligns row content in top vertical position, but I want to set a center…
Mike B.
  • 10,955
  • 19
  • 76
  • 118
52
votes
10 answers

Text vertical align in react native (using nativebase)

I was wondering there is a way I can align vertically in React Native. I'm trying to position on the bottom but I don't think I can find a good way to do it. If anyone knows how to solve this issue, please let me know.
ckim16
  • 1,119
  • 2
  • 14
  • 27