Centering a dynamic-width block on a web page with CSS

I was trying in designing a new home page for Keyboard Playing that implied CSS centering. And I succeeded. It even passes the W3C validation services (for now that is; it may change next time I tinker with it).

Yet, my layout put me in some difficulty until I found a way to do it. Basically, I wanted a keyboard (did not even think of a link with the name) of buttons leading to various links, but this keyboard had to be centered in page. And I wanted this centering to be dynamic.

I found a way. I am not proud of it since, though the W3C validator acknowledges it, IE7 does not. Well, it is not beautiful but can be used anyway.

So, read this post if you want some advice… Continue reading Centering a dynamic-width block on a web page with CSS