Home >Web Front-end >HTML Tutorial >div overlapping problem
I defined two p's in html, but the displayed result is that the two p's partially overlap. Originally they were not overlapping. I don't know which key I touched. At runtime, the layers overlapped. I put those two When p is taken out separately, it shows normal. I just want to ask what is the reason for this situation?
I made the homepage of a portal website with a lot of code. Please give me some experience tips
It is usually caused by the code in css or style
Usually it’s the code in css or style that causes this answer to me. . .
Can you be more specific?
There is no code or address, so I can’t give you details.
To achieve overlap, generally set position:absolue, and then set the same top and left. The key is to post the relevant code of your overlap
Post the code to see
Quoting the reply from net_lover on the 1st floor: It is usually the code in css or style that causes this answer. . .
Can you be more specific? Why do the various p's I defined affect each other? If I change one of them, the whole page will be messed up. According to experience, what is going on?
It is usually caused by using float positioning. This method can lead to page confusion if the width is slightly changed.
There is no code or address, so I can’t give you a detailed explanation.
To achieve overlap, generally set position:absolue, and then set the same top and left. The key is to post the relevant code of your overlap. The main reason is that there is too much code. Copy and paste it, and no one is happy to see it. I did it for two whole days, and this problem still occurred. Repeatedly repeated, I almost collapsed
Well, use firebug to locate it and take a look.