June 6, 200818 yr HI, I am trying to adapt a three column layout that I copied from the tutorials on this site. So far it seems to be working OK. But when I try to drop a background image in to the right column the image does not show because there is no text in the right column. If I add text part of the image shows. Is there a way I can use this image and get it to appear properly without adding text to the right column. Here is the CSS: #right { background-image: url(../images/leaf.gif); background-repeat: no-repeat; border: 1px solid pink; padding-top: 10px; padding-right: 20px; padding-bottom: 10px; padding-left: 20px; height: auto; width: 160px; float: left; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 6px; Many thanks, Slooshy
June 6, 200818 yr you will have to define an actual height to your css, as auto won't detect how big you need it to be.
June 6, 200818 yr this seems like a stupid question, but why have a column with nothing in it? The solution is to fix the dimensions, much like the width is set at 160px, set the height to whatever you want it to be, eg 400px (replaces the word 'auto') and the column will be instructed to stay these dimensions high and wide. The problem of course is that if whatever content is going in there is changing a lot, then you risk running out of room.
June 6, 200818 yr Author this seems like a stupid question, but why have a column with nothing in it? The solution is to fix the dimensions, much like the width is set at 160px, set the height to whatever you want it to be, eg 400px (replaces the word 'auto') and the column will be instructed to stay these dimensions high and wide. The problem of course is that if whatever content is going in there is changing a lot, then you risk running out of room. Oh Fantastic! It works! You don't know how crazy this was making me. Thankyou.
June 6, 200818 yr excellent. just remember that background images count for nothing as far as content is concerned. A div with a bg image will need other coded content in order for it to be visible.
Create an account or sign in to comment