Jump to content


Photo

order of containers


  • Please log in to reply
2 replies to this topic

#1 Ricklord

Ricklord
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 26 August 2006 - 02:26 PM

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 www.creativecogs.co.uk/ecommerce_demo

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
#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;
}

HTML with how i have added the tables and looks messy which is why i want to get it all in CSS if possible

<div id="sidebar">
  <table width="200" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="200" height="20" background="images/sidebar_top.gif">&nbsp;</td>
    </tr>
    <tr>
      <td width="200" height="20" background="images/sidebar_body.gif"><p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p></td>
    </tr>
    <tr>
      <td width="200" height="20" background="images/sidebar_bottom.gif">&nbsp;</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">&nbsp;</td>
  </tr>
  <tr>
    <td width="580" height="20" background="images/content_body.gif"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td width="580" height="20" background="images/content_bottom.gif">&nbsp;</td>
  </tr>
  <tr>
    <td width="580" height="20" background="images/special_top.gif">&nbsp;</td>
  </tr>
  <tr>
    <td width="580" height="20" background="images/special_body.gif"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td width="580" height="20" background="images/special_bottom.gif">&nbsp;</td>
  </tr>
</table>
</div>

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

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 26 August 2006 - 02:33 PM

http://www.alistapar...es/fauxcolumns/

That's how 'everyone' solves the problem simply.
Legend has it that reading the manual never killed anyone.
My site

#3 Ricklord

Ricklord
  • Members
  • PipPipPip
  • Advanced Member
  • 60 posts

Posted 26 August 2006 - 03:30 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users