PDA

View Full Version : Cell issue


Rich
03-24-2005, 10:09 PM
Hello,
I have been trying to work with some cells that will surround the blocks. The code is working fine, except it pushes blocks away. So, the blocks won't stay in line and it tosses my homepage into a spin. I was trying to hardcode it because i don't know any other way to do it.

I opened each block and added this code to it:


<table align="center"><td valign="top">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleft.jpg" width="20" height="35"></td>
<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddle.jpg"></td>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideright.jpg" width="20" height="35"></td>
</tr><tr>
<td background="http://www.iguanacenter.com/images/blockimg/asideleft.jpg"></td>
<td>

<!--Start Text Here-->

Whatever is written in place of this text is surrounded by the cells. I got that working. But something is wrong because it throws all the blocks into a spin. What is coded wrong that would cause that? I would like for all of the blocks that I make in the future to also work with this code.

<!-- /End Text Here-->

</td>
<td background="http://www.iguanacenter.com/images/blockimg/asideright.jpg"></td>
</tr><tr>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleftbottom.jpg" width="20" height="35"></td>
<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddlebottom.jpg"></td>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsiderightbottom.jpg" width="20" height="35"></td>
</tr></table>
</div><br /><br />

</td>

This is my first run with cells. I thought I had done everything right. It looked great on my pc. lol Once I added this code to the blocks, some got covered by other blocks, some stayed in place and started a new line, etc. How could I make this code work so that if added to each block, they would all remain uniform?

Thanks to anyone that has a better knowledge of this than me.

Jolten
03-24-2005, 10:32 PM
You're missing a tr tag a closing tr and a closing table tag. In addition, you don't need the div tags.

This code is correct and working here:


<table align="center">
<tr>
<td valign="top">

<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleft.jpg" width="20" height="35"></td>
<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddle.jpg"></td>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideright.jpg" width="20" height="35"></td>
</tr>
<tr>
<td background="http://www.iguanacenter.com/images/blockimg/asideleft.jpg"></td>
<td>

<!--Start Text Here-->
sad
ssssssssasdasd
<!-- /End Text Here-->

</td>
<td background="http://www.iguanacenter.com/images/blockimg/asideright.jpg"></td>
</tr>
<tr>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsideleftbottom.jpg" width="20" height="35"></td>
<td background="http://www.iguanacenter.com/images/blockimg/aeditsidemiddlebottom.jpg"></td>
<td>
<img border="0" src="http://www.iguanacenter.com/images/blockimg/aeditsiderightbottom.jpg" width="20" height="35"></td>
</tr>
</table>
<br /><br />

</td>
</tr>
</table>

Rich
03-25-2005, 01:46 PM
Hello,
Thank you Jolten. I didn't realize that I missed those.(It is sad that i didn't see that on my own. lol) I appreciate you taking the time to look it over.This is all new to me, so I am learning as I go. This was my first attempt at writing cells that will encompass what I want.

****UPDATE**** ERRORS WITH CODE SOMEWHERE????

I added the revised code to the blocks and it appears that you have taken care of the problems regarding the pushing of the blocks. Not sure if you realize it though, but the blocks are not even anymore.

They don't resize to the width of the forum anymore. Its almost as if they are a fixed width. The center modules taper off into smaller and smaller blocks. Some of the side blocks, depending upon which column I place them,are larger and smaller than the one above or below.

This happens in both Mozilla and IE 6. In mozilla, the top 3 blocks are evenly spaced. In IE 6, the left side of the center block has a larger space than the right.

I will leave them they way they are so they can be seen. You will see exactly what I mean is happening when you look at the blocks.

Here is the site: http://www.iguanacenter.com

If you would like to log in, use: User: tester Pass: tester

Rich
03-29-2005, 11:43 AM
Hello,
After trying the code Jolten posted again on all the modules, I found that it worked for all but 3-4 of them. For some reason, certain modules will not expand the full width unless they are hardcoded with a width specification.

I didn't add the width specification to the code Jolten supplied. Instead, I added it to the modules table width like this:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder"width="145">

Opposed to saying width="100%", those that won't expand to the same width as the others needs to be set as width="150", or whatever width in pixels your site requires. (Mine required "145" for the "buddies" module.)

Jolten also tried to help me on another site regarding this same issue. Just wanted to say thanks in this thread so the members knew that they could use this code, and also how to set the width so it displays correctly on those modules that are resilient. lol

Thanks again.