Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

CSS element moving

Hello I have had this issue since the beginning of my web development start. When I zoom in the container moves in too. any way i can solve this?

.darkslidecont{
    width: 200px;
    height: 50px;
    position: relative;
    background-color: white;
    left: 80%;
    display: block;
    flex-wrap: flex;
}
<header>
    <h1 id="welcomeText"><u>Welcome to My Portfolio!</u></h1>
    <div class="darkslidecont">
    </div>
</header>

I have played around with the positions and display but no luck

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Reset css

* {
  margin: 0;
  padding: 0;
}

.darkslidecont{
    width: 200px;
    height: 50px;
    position: relative;
    background-color: white;
    left: 80%;
    display: block;
    flex-wrap: flex;
}
<header>
    <h1 id="welcomeText"><u>Welcome to My Portfolio!</u></h1>
    <div class="darkslidecont">
    </div>
</header>
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading