John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to vertically align an element?

I want to vertically align am element (like a label) inside a gridcell for example. I wrote this css and doesnt work:

.text_vert_center {
vertical-align: center;
}

is there anything wrong with this css?

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to vertically align an element?

Hi John!

Do you want the text in Label component inside Gridcell to be centered? Please in Properties of Lable choose Center Align.

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to vertically align an element?

Code you've sent is correct, but to set value of vertical align look here https://developer.mozilla.org/en-US/d...

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to vertically align an element?

i also tried that inside the properties - i added both of these properties and does not work:

Attribute Value
Align Center
vertical-align center

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to vertically align an element?

Also to vertical-align components in Cell you can select the Cell, click More properties on Properties panel and add property align = middle.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to vertically align an element?

ive that and doesnt work. It seems anytime i add any properties nothing ever works there

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to vertically align an element?

i wrote this code too in css and doesnt work:

.text_vert_center {
vertical-align: middle;
}

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

how to vertically align an element?

Do you test it with only Label component inside?
Try to add images like it is shown in the picture Image
and test now.

John Herdean
Posts: 0
Joined: Tue May 14, 2013 3:56 am

how to vertically align an element?

i tried 2 ways in the label itself and the cell itself like this (attribute = value):

vertical-align = middle
align = middle

and i also tried the 4 css codes on the label, nothing seems to work:

.text_vert_center {
vertical-align: middle;
}

.text_vert_center {
align: middle;
}

.text_vert_center {
vertical-align: center;
}

.text_vert_center {
align: center;
}

this is the result i get:

Image

the label is supposed to be centered vertically to the image since they are both in a 2 column grid

Return to “Issues”