i need my ng content and text to align to center this is the current situation:
<div
(mouseenter)="mouseEnter()"
(mouseleave)="mouseLeave()"
style="text-align: center"
>
<ng-content></ng-content>
</div>
<span style="text-align: center" *ngIf="isTitleVisable">
{{ title }}
</span>
<div *ngIf="!isTitleVisable"><br /></div>
i want the ng content to stay in place exactly like the 2nd pic but when the text mouse exit the ng-content,the text disapear (as it should) and the content goes left.
Generally you use a variable -sorry if the response is not exact fit to your requirements-, So imagine some like
When a mouse enter a variable defined in your .ts becomes true, when the mouse out the variable becomes false. The [style.text-align] is center when the variable is true and null (if is null, angular remove the
style.text-alignattribute) when is false.You can use also use a class
centerin your .css and use some likeor