My websites layout gets messed up when I zoom in or out! :(

may I ask why is ID’s bad practice over classes?

It’s an issue to me as using id’s overwrite any codes added under certain classes and the use of classes sometimes takes on the parent element as this can be an issue as incase applying styles to an existing element overrides classes and can be a setback for the way you wish to design

as in use of id’s it will usually overwrite any code the parent element gives them and can be helpful to target certain elements as for instance like a file structure.

Head → nav-> a:links I never go past 3 id selections but doing it this avoids too many complications to codes edited by other id’s, and for me can be handy to pin point problems a little better.

I just want to know why is it better to use classes as this causes too many different assigned classes to effect their siblings and can be confusing when trying to fix?