Ricklord Posted August 26, 2006 Share Posted August 26, 2006 Hey Guys, Im creating a demo store for my website and was just wondering if some one could help me with a small problem. If you look at the site here [url=http://www.creativecogs.co.uk/ecommerce_demo]www.creativecogs.co.uk/ecommerce_demo[/url]The side bar and the 2 content areas have been set up in my CSS but i have had to put tables in to be able to get the background to expand as content is added. Is there away to get the backgorund image to expand without using a table?At the moment i have got the 2 containers as below and then just inserted tables into the containers with 3 rows and split the image for top, body and bottom so that the body cell will expand and the background will repeat. css for this part[code]#sidebar { float:left; width: 200px; background-color:#FFFFFF;}#content { float:left; width: 580px; background-color:#FFFFFF; }#footer { clear:both; width: 780px; height: 30px; padding: 10px 0 0 0; text-align:center; background-image:url(images/footer.gif); background-repeat:no-repeat;}[/code]HTML with how i have added the tables and looks messy which is why i want to get it all in CSS if possible[code]<div id="sidebar"> <table width="200" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="200" height="20" background="images/sidebar_top.gif"> </td> </tr> <tr> <td width="200" height="20" background="images/sidebar_body.gif"><p> </p> <p> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td width="200" height="20" background="images/sidebar_bottom.gif"> </td> </tr> </table></div><div id="content"><table width="580" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="580" height="20" background="images/content_top.gif"> </td> </tr> <tr> <td width="580" height="20" background="images/content_body.gif"><p> </p> <p> </p> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td width="580" height="20" background="images/content_bottom.gif"> </td> </tr> <tr> <td width="580" height="20" background="images/special_top.gif"> </td> </tr> <tr> <td width="580" height="20" background="images/special_body.gif"><p> </p> <p> </p> <p> </p> <p> </p></td> </tr> <tr> <td width="580" height="20" background="images/special_bottom.gif"> </td> </tr></table></div>[/code]I have tried to do this a couple of ways but i always loose the order of my containers and it ends up being all messy.If anyone knows what i need to do please can you post example code or point me in the direction of the code i need to change/include.Thanks in advance Rick Quote Link to comment https://forums.phpfreaks.com/topic/18723-order-of-containers/ Share on other sites More sharing options...
AndyB Posted August 26, 2006 Share Posted August 26, 2006 http://www.alistapart.com/articles/fauxcolumns/That's how 'everyone' solves the problem simply. Quote Link to comment https://forums.phpfreaks.com/topic/18723-order-of-containers/#findComment-80743 Share on other sites More sharing options...
Ricklord Posted August 26, 2006 Author Share Posted August 26, 2006 Cheers Andy, Managed to get it to work now, not sure if its the corrent way but looks alot tidier now its in CSS with the rest of the page. That site was helpful but didnt give me the exact answer. Cheers again Rick Quote Link to comment https://forums.phpfreaks.com/topic/18723-order-of-containers/#findComment-80761 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.