Page 1 of 4

how to vertically align an element?

Posted: Sat Jun 01, 2013 1:57 am
by John Herdean

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?


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:16 am
by Alena Prykhodko

Hi John!

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


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:23 am
by Alena Prykhodko

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


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:30 am
by John Herdean

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

Attribute Value
Align Center
vertical-align center


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:34 am
by Alena Prykhodko

how to vertically align an element?

Posted: Sat Jun 01, 2013 2:44 am
by Alena Prykhodko

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


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:50 am
by John Herdean

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


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:51 am
by John Herdean

i wrote this code too in css and doesnt work:

.text_vert_center {
vertical-align: middle;
}


how to vertically align an element?

Posted: Sat Jun 01, 2013 2:58 am
by Alena Prykhodko

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


how to vertically align an element?

Posted: Sat Jun 01, 2013 3:19 am
by John Herdean

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