Max Aquino
Max Aquino

Reputation: 31

How to prevent an html element from being moved by other elements in CSS?

I'm almost 100% sure this is a css problem and as I suck at css I have no clue how to remedy it. There are no display modes or positioning specified in the css. When I spawn in my header elements, the laser beam that the ship is supposed to shoot out is offset and changes positions when the different headers are removed. How can I fix this? Here is a recording of the website. http://recordit.co/WkQOViHtUs

Upvotes: 0

Views: 1547

Answers (1)

BlueBird931
BlueBird931

Reputation: 95

You could try setting the position in the laser’s css to absolute instead of relative with this:

position: absolute;

But I don’t know if this would work with the other interactions and code you’ve made. You should copy paste the rest of the code so that we can better understand the problem.

Upvotes: 2

Related Questions