this post was submitted on 26 Mar 2024
1 points (100.0% liked)

Programmer Humor

32000 readers
1744 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

top 10 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 5 months ago
[–] [email protected] 1 points 5 months ago* (last edited 5 months ago)
#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

[–] [email protected] 0 points 5 months ago (1 children)

I refuse to believe that's CSS. What is that colon at the end even?

[–] [email protected] 1 points 5 months ago (1 children)

It’s a typo. The colon should be a semicolon. But since it’s the last declaration, it’s optional.

[–] [email protected] 0 points 5 months ago (1 children)

I don't think bottom is a valid value for the position property either.

[–] [email protected] 1 points 5 months ago (1 children)

Yep, and align isn’t a real property, either.

[–] [email protected] 1 points 5 months ago

How deep does this rabbit-hole go?!

[–] [email protected] 0 points 5 months ago (1 children)

came to hate on this code; it’s not valid lol

[–] [email protected] 2 points 5 months ago (1 children)
[–] [email protected] 1 points 5 months ago