Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shifting Cell when adding text within the same table

Status
Not open for further replies.

Dipesh21

Technical User
Dec 16, 2003
18
GB
Can anyone please tell me why, when I add text into a cell within a table another cell in the same table shifts? I can't understand this since I am only adding text.

Your help would be most appreciated. Cheers!
 
If this is in design view and the text takes up more space than is assigned then it will aadjust the table around it to fit.

Post some code with text examples of what you are adding

Cheech

[Peace][Pipe]
 
This is the code for the cell that I am adding the text to:

<tr>
<td height=&quot;677&quot; colspan=&quot;2&quot; valign=&quot;top&quot; background=&quot;../Background%20Image/background-image_r3_c2.gif&quot;><!--DWLayoutEmptyCell--> </td>
</tr>
<tr>

This is the code for the cell that moves when the text is added:

<table border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; width=&quot;248&quot;>
<!-- fwtable fwsrc=&quot;top right buttons.png&quot; fwbase=&quot;top right buttons.gif&quot; fwstyle=&quot;Dreamweaver&quot; fwdocid = &quot;742308039&quot; fwnested=&quot;0&quot; -->
<tr>
<!-- Shim row, height 1. -->
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;43&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;39&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;40&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;56&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;70&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;1&quot; height=&quot;1&quot; border=&quot;0&quot;></td>
</tr>
<tr>
<!-- row 1 -->
<td colspan=&quot;5&quot;><img name=&quot;top20right20buttons_r1_c1&quot; src=&quot;../top%20right%20menu/top%20right%20buttons_r1_c1.gif&quot; width=&quot;248&quot; height=&quot;27&quot; border=&quot;0&quot; alt=&quot;&quot;></td>
<td><img src=&quot;../top%20right%20menu/spacer.gif&quot; alt=&quot;&quot; name=&quot;undefined_2&quot; width=&quot;1&quot; height=&quot;27&quot; border=&quot;0&quot;></td>
</tr>
<tr>
 
hieght is an unsupported parameter in html

[Peace][Pipe]
 
What does that mean and is this the reason why it's shifting horizontally? What do I need to do?
 
Code:
<tr> 
    <td height=&quot;677&quot; colspan=&quot;2&quot; valign=&quot;top&quot; background=&quot;../Background%20Image/background-image_r3_c2.gif&quot;><!--DWLayoutEmptyCell--> </td>
  </tr>
  <tr> 

becomes 

<tr> 
    <td colspan=&quot;2&quot; valign=&quot;top&quot; background=&quot;../Background%20Image/background-image_r3_c2.gif&quot;><!--DWLayoutEmptyCell--> </td>
  </tr>
  <tr>

But if you add anything to a table cell that is bigger than the existing content it will stretch.

try sticking this style in your head
Code:
<style>
.contents {
padding-left: 10px; 
scrollbar-face-color: #ffffff;
scrollbar-highlight-color: #ffffff;
scrollbar-shadow-color: #ffffff; 
scrollbar-3dlight-color: #999999; 
scrollbar-arrow-color: #660033; 
scrollbar-track-color: #cccccc; 
overflow:auto; 
border: 1 solid #000000; 
background-color: white; 
width:600; height:290;}
</style>

and setting the class of your td to contents.

Cheech


[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top