CSS comes with quite a few production faults. You can?t properly vertically align, and you can?t comfortably create columns in a website without hacks.
In the image on the right there are two floated divs used to create columns. If there’s a border on the left column and shorter than the right column, the border will also be shorter.
The Required Result
Both columns have a border. The left column is displaced one pixel to the right. This way, the borders overlap, and the longest border reaches the bottom of the page.
In general, the concept of moving element with negative margins or position is quite interesting and can be an effective solution to many problems. I?m sure I?ll deal with it in future posts.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19