how can i Center a div?

1,094 views
Skip to first unread message

fces...@gmail.com

unread,
Oct 1, 2013, 1:41:34 PM10/1/13
to gwd...@googlegroups.com
I tried to center a div with the default align at the top bar, but it doesn´t work. Someone know how can I fix it?

Valerio Virgillito

unread,
Oct 1, 2013, 2:59:44 PM10/1/13
to gwd...@googlegroups.com
There's a checkbox next to the align buttons that allows 'Align to Stage'. Enable that checkbox and then try aligning your div again. Make sure the div is selected first.

Let me know if that helps.

Thanks,
Valerio.

fces...@gmail.com

unread,
Oct 1, 2013, 3:40:54 PM10/1/13
to gwd...@googlegroups.com
thanks valerio, but didn't work. when i do that the div get a margin-left and it's not in the middle. even if i align to the right the div won't stay in the right. It's like my monitor ends before the real ending. Just if i align to the left it works

Jason Long

unread,
Oct 1, 2013, 5:25:15 PM10/1/13
to
Can you try the "Align: vertical center" and "Align: horizontal center" buttons after you have the "Align to Stage" checkbox box checked?

Thanks
Jason

mogv...@gmail.com

unread,
Oct 9, 2013, 4:44:15 PM10/9/13
to gwd...@googlegroups.com
it doesn't work :(

jonniegr...@gmail.com

unread,
Oct 9, 2013, 4:48:16 PM10/9/13
to gwd...@googlegroups.com
I have found this doesn't work as well. The only way I can work ou how to get the text where I want is to nest one div inside another. But the likes of vertical-center of valign just don't seem to work.

Beshoy Atef

unread,
Oct 10, 2013, 1:31:52 AM10/10/13
to gwd...@googlegroups.com
Give the div a fixed width
Then margin:auto;

Amila

unread,
Oct 11, 2013, 7:05:45 AM10/11/13
to gwd...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages