Align a DIV to the center of his container

First, we have point something: we cannot center a div that its not sized. That's mean we have to specify a width and a height value.

Read full article

Make a DIV to take the size of its content

I want to keep a record of those things of CSS that always drives me mad, and always forget and always have to do a search in Google to find the solution. Let's be honest, CSS is not one thing that us as developers love, it make me mad when i was developing some javascript controls and made me curse when i had to made some Internet Explorer 6 development. But when you start to understand it, you start to love it.

One of those things was how to make a %$"%$"##% < div > to take the size of its content.

Read full article