Smokes your problems, coughs fresh air.

Category: Technology (Page 13 of 48)

WordPress admin bar and absolute CSS positioning

WordPress 3.2 introduced an admin bar, which is fixed at the top of the window when you’re logged in. An annoying side-effect that has been bugging me for some time is that, although this pushed down most of my content, HTML elements that used absolute positioning stayed in there old place. This didn’t look particularly good, but I left it hanging for a long time because it only affected logged in users (that is: either me or Halfgaar).

The fix is actually rather simple. I added the following rule:

body {:; }

It may seem non-obvious, but absolutely positioned elements are actually positioned relative to their relatively positioned ancestors. Well, just read the proper explanation at CSS-Tricks. I can’t explain this shit.

WordPress admin bar with correct positioning

How it was supposed to look

WordPress admin bar induced CSS positioning screw-up

How it really looked

Hobo Lobo of Hamelin

Hobo Lobo of Hamelin is worth looking at even if just for the novelty of how the story and artwork are digitally presented (something to do with a ‘parallaxer’). But, I’d much rather let the creator do the talking:

‘Hobo Lobo of Hamelin is a thing by a dude, who’s all like, “I’M GONNA MAKE A THING.” And then he did. Or is doing. Or, you know, whatever. This dude can be found on the internet. He kerns alphabet soup and rearranges window dressing in the aether to put food on his family.’

Making Linux less dumb about failed DNS servers

Whenever one of the servers in /etc/resolv.conf is unreachable, Linux/glibc/whatever isn’t smart enough not to retry it for a while. This results in a lot of services becoming unavailable, because a lot of them do reverse lookups on all incoming connections (like SSH), which will hang for the time-out of the first DNS server query.

There doesn’t seem to be a solution, but I worked around it a little bit by putting this in /etc/resolv.conf (or /etc/resolvconf/resolv.conf.d/base && resolvconf -u):

options timeout:2 rotate

Still not perfect, but more workable.

« Older posts Newer posts »

© 2025 BigSmoke

Theme by Anders NorenUp ↑