How to hide an element, without it moving other elements?
2,376 views
Skip to first unread message
Pierre M
unread,
Nov 12, 2013, 2:46:50 PM11/12/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
When I use "ng-hide" on a button, the elements to the right hand-side of the button move when the button gets hidden.
How could I avoid these other elements moving?
Thank you
Pierre
Michael Bielski
unread,
Nov 12, 2013, 3:00:07 PM11/12/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
ng-hide uses "display:none" which removes the element from the display calculations. You need to make a new directive that uses "visibility:hidden" which will keep the item in the display calculations.
Pierre M
unread,
Nov 12, 2013, 7:47:23 PM11/12/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Great, thanks a lot Micheal :) I'm surprised to not find it on ngmodules.com, it might become my first contribution.
ng-hide uses "display:none" which removes the element from the display calculations. You need to make a new directive that uses "visibility:hidden" which will keep the item in the display calculations.