Anonymous
Margin Property не работает над основным элементом?
Сообщение
Anonymous » 12 фев 2025, 04:57
Я делаю простой проект для наставника Frontend, и по какой -то причине я не могу сосредоточить свой «основной» элемент на странице. В Chrome Inspector он говорит мне, что Маржа - это «недействительное свойство». Я не понимаю, почему, похоже, я использовал один и тот же код в более ранних проектах и имел нулевые проблемы ... вот HTML -код: < /p>
Код: Выделить всё
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>
и 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%);
}
попытался изменить свойство дисплея, но, казалось, ничего не сработало.
Подробнее здесь:
https://stackoverflow.com/questions/794 ... in-element
1739325430
Anonymous
Я делаю простой проект для наставника Frontend, и по какой -то причине я не могу сосредоточить свой «основной» элемент на странице. В Chrome Inspector он говорит мне, что Маржа - это «недействительное свойство». Я не понимаю, почему, похоже, я использовал один и тот же код в более ранних проектах и имел нулевые проблемы ... вот HTML -код: < /p> [code] 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> и 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%); } [/code] попытался изменить свойство дисплея, но, казалось, ничего не сработало. Подробнее здесь: [url]https://stackoverflow.com/questions/79431740/margin-property-not-working-on-a-main-element[/url]