Page 1 of 1

Margin -Eigenschaft funktioniert nicht an einem Hauptelement?

Posted: 12 Feb 2025, 02:57
by Anonymous
Ich mache ein einfaches Projekt für Frontend Mentor und aus irgendeinem Grund kann ich mein "Haupt" -Element auf der Seite nicht zentrieren. Im Chrome Inspector sagt es mir, dass der Rand eine "ungültige Eigenschaft" ist. Ich verstehe nicht warum, scheint den gleichen Code für frühere Projekte zu verwenden und keine Probleme zu haben ... hier ist der HTML -Code: < /p>

Code: Select all














Frontend Mentor | Social links profile





[img]./images/avatar-jessica.jpeg[/img]

Jessica Randall
London, United Kingdom

"Front-end developer and avid reader."
GitHub
Frontend Mentor
LinkedIn
Twitter
Instagram


Challenge by [url=https://www.frontendmentor.io?ref=challenge]Frontend Mentor[/url].
Coded by [url=#]Your Name Here[/url].




< /code>
und CSS: < /p>
html,
body {
cursor: url("./images/up-sign.png"), default;
}

body {
background-color: hsl(0, 0%, 8%);
font-family: 'Inter', sans-serif;
color: hsl(0, 0%, 100%);
}

.card {
background-color: hsl(0, 0%, 12%);
border-radius: 15px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: center;
height: 500px;
width: 300px;
padding: 20px;
margin: 200px, auto;
}

.profilePic {
width: 75px;
border-radius: 50%;
}

.name {
font-size: 22px;
margin-bottom: 10px;
}

.bio {
font-size: 11px;
font-weight: 400;
}

.location {
font-weight: 600;
font-size: 12px;
color: hsl(75, 94%, 57%);
}

.profHead {
text-align: center;
}

button {
background-color: hsl(0, 0%, 20%);
color: hsl(0, 0%, 100%);
font-size: 12px;
font-weight: 600;
border-radius: 5px;
border-style: none;
width: 250px;
height: 40px;
}

button:hover {
background-color: hsl(75, 94%, 57%);
color: hsl(0, 0%, 12%);
cursor: pointer;
}

footer {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
text-align: center;
}

.attribution {
font-size: 11px;
text-align: center;
}

.attribution a {
color: hsl(228, 45%, 44%);
}
Ich habe versucht, die Anzeigeeigenschaft zu ändern, aber nichts schien richtig zu funktionieren.