Negative Margins

Category Image 052

PPK digs into the subject, which he found woefully undercovered in web tech documentation. Our entry doesn't mention them at all, which I'll aim to fix.

Agree on this situation:

This is by far the most common use case for negative margins. You give a container a padding so that its contents have some breathing space. However, you want the header to span the entire container, ignoring the padding. Negative margins are the way to go.

Like this:

Anecdotally, I find negative margins fairly intuitive. Although that's surprising since there are so many oddities, like how they sometimes affect the element applied to itself (e.g. move itself to the left) and sometimes affect other elements (e.g. move other elements upward) — plus the fact that it affects margin collapsing which is weird anyway.

It would probably be smart to do this directional margin stuff with logical properties too.

Direct Link to ArticlePermalink

The post Negative Margins appeared first on CSS-Tricks.

Go Gets Protocol Buffering

Featured Imgs 23

The latest Go API release includes support for protocol buffers: Google's language-neutral and platform-neutral data interchange format. Although protocol buffer bindings were originally rolled out for Go between 2010 and 2012, Go and protocol buffers have both evolved. Because user changes have evolved to a point where making new practices compatible with older versions, the latest Go release includes a completely rebuilt protobuf module.

WordPress Database Clean-up – How to Go about It?

Featured Imgs 23

Operating a WordPress website comprises of multiple tasks! One of the most crucial and overlooked tasks is database maintenance. Most people think that the MySQL database is an essential Aspect of WordPress install and conveniently forget about the same. It is necessary to manage the database systems in WordPress. There needs to be daily clean-ups […]

The post WordPress Database Clean-up – How to Go about It? appeared first on WPArena.