To avoid components overlapping in angular

夙愿已清 提交于 2020-01-06 05:26:18

问题


I have two components called customer-details and customer-bookings which are called by their selectors in app.component.html file as shown in below code

     <app-customer-details></app-customer-details>
     <app-customer-bookings></app-customer-bookings>

The components should look like this(i,e one below the other).

But it is overlapping like this.

Here i am facing overlapping issues,I tried to solve it by setting height to 50vh for each component. But i want to solve this overlapping issue without setting the height manually.

Here is the stackblitz link.


回答1:


You should remove this from your table style:

position:absolute;

in customer-details.component.css




回答2:


Noting to do with the component. Just modify the CSS.

table{
  /* position:absolute; */
}


来源:https://stackoverflow.com/questions/52495000/to-avoid-components-overlapping-in-angular

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!