Getting Even Columns
- 0
- Add a Comment
I am not a cascading style sheet master nor do I play one on TV. One CSS problem I have had for a while is getting columns to even out. The problem is when you have one column that is bigger than the other. How do you get the background color for the second column all the way down to where the first column ends?
I am happy to say I found an answer over at A List Apart.
One of the somewhat frustrating properties of CSS is the fact that elements only stretch vertically as far as they need to. Meaning, if a 200-pixel tall image is contained within a div, the div will only expand down the page 200 pixels.
This becomes an interesting dilemma when you use div’s to section your markup, then apply CSS to create a columnar layout. One column may be longer than the other (see Figure 1). Depending on the amount of content contained, it becomes difficult to create a layout with two equally tall columns when a unique background color is desired for each column.
Now if I could just find somebody to teach me the one hundred and one other little problems I have in CSS, and I would be alright. One thing I can say for sure though, after finding out how fix a problem yourself, if feels much more rewarding than hiring a professional designer.
Read More About Evening Out Your Columns!
[tags]design,code,css,designers,columns,even[/tags]
