Centering core-icon inside of paper-item

85 views
Skip to first unread message

Jelena Jovanovic

unread,
Dec 14, 2014, 1:47:17 PM12/14/14
to polym...@googlegroups.com
Hi,

How can I center content inside of <paper-item> ? I tried to make it work, but no success. The code is pretty simple:

<paper-item>
 <core-icon icon="menu"></core-icon>Menu
<paper-item>

Thanks in advance.




Jason Park

unread,
Dec 15, 2014, 9:23:46 PM12/15/14
to polym...@googlegroups.com
You can try wrapping content of paper-item inside another div for centering.

http://jsbin.com/voyagorono/4/edit?html,output

da...@davidapearce.com

unread,
Dec 18, 2014, 10:58:04 AM12/18/14
to polym...@googlegroups.com
Try adding the attributes "layout horizontal center-justified" to the paper-item.

Jelena Jovanovic

unread,
Dec 18, 2014, 12:30:36 PM12/18/14
to polym...@googlegroups.com, da...@davidapearce.com
Thanks David, that worked! :)

Jelena Jovanovic

unread,
Dec 18, 2014, 12:35:07 PM12/18/14
to polym...@googlegroups.com
Hey Jason, thanks for response.
Yes that would certainly worked but I wanted to achieve that with more clean solution. That is why I asked if there is some polymer class for that or something, and David gave me an answer exactly what I need.
Reply all
Reply to author
Forward
0 new messages