I refuse to believe that's CSS. What is that colon at the end even?
this post was submitted on 26 Mar 2024
2 points (100.0% liked)
Programmer Humor
32508 readers
413 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
came to hate on this code; it’s not valid lol
#moustache {
position: absolute;
bottom: 10px;
margin: 0 auto;
}
If that doesn't work:
#moustache {
position: absolute;
bottom: 10px;
left: 50%;
transform: translateX(-50%);
}
Relative positioning is preferred but not always available if the parent face is positioned absolutely.
Edit: adjusted bottom from 0 -> 10px since 0 would be at the bottom of the chin but there is obviously some padding to bring it nearer the lip