0

I have a base component which have a header component selector and then ion-router-outlet. I would like to add an any html card on a first page which is Home as my routes. If I place html card on base component then html output seems fine but when I place html card on Home component which will be a child for base, my card renders behind the header or we can say overlap as in the image below: Ionic 4 and Angular 8 is used.

Html overlap issue

1
  • Please, share css of HTMLCard.component.html and see more details. Commented Sep 24, 2019 at 21:15

1 Answer 1

0

It's possible that your HTML card doesn't have in the own selector css some:

display:block;
position:relative;

Or you have position:absolute to HTMLCard.component.html. Remove this!

So that the other components understand that something is above and they can position me immediately below.

Normally that happens when (in this case: home.component.html) does not relatively detect an element rather than respect and place itself below.

Sign up to request clarification or add additional context in comments.

2 Comments

Nope it's not working. I've added a class to my htmlCard's root element with given css and checked for any absolute on Header
@AbhishekChokra Could you apply this class in runtime mode from the Developer Tools of the browser? 2 things happen: Either the HTMLCard is in absolute css or the HomeComponent is, but neither of them is being recognized side by side.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.