• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 468
  • Last Modified:

making a div stretch across colspans

I have:

<td colspan="6"><div id="divNote<?=$row['id']?>" style="display:none" class="light_blue" ><?=$row['note_text'];?></div></td>

How do I make the div which appears via ajax stretch the whole length of the 6 colspans?  right now it only stretches the length of the words wrapped inside of the divs...

I tried width 100% on the class="light_blue" that didn't work..
0
cstormer
Asked:
cstormer
  • 2
1 Solution
 
basicinstinctCommented:
i tested in Firefox 2 and IE6 (on Linux) and in both cases the DIV streched the full six columns using this test page:

<html>
<head>
</head>
<body>
<table>
<tr>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
</tr>
<tr>
<td colspan="6"><div style="border:solid;" >Hello</div></td>
</tr>
</table>
</body>
</html>
0
 
cstormerAuthor Commented:
This is compiled code:
<tr>
<td colspan="6"><div id="divNote1000" style="display:none" class="light_blue" >Bromley called to see what the status was with her order, please give her a call.</div>
</td>
</tr>

styles on the code:
.light_blue {
      width:90%;
      min-width: 500px;
      padding: 5px;
      border: 1px solid #cccbb7;
}
0
 
basicinstinctCommented:
still works fine for me, the div goes across all six cells...

of course, you do know that :style="display:none;" will cause the div to be hidden... you need to get rid of that if you want to see the div...

<html>
<head>
<style type="text/css">
  .light_blue {
        width:90%;
        min-width: 500px;
        padding: 5px;
        border: 1px solid #cccbb7;
}
</style>
</head>
<body>
<table>
<tr>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
<td>Hi</td>
</tr>
<tr>
<td colspan="6"><div id="divNote1000" class="light_blue" >Bromley called to see what the status was with her order, please give her a call.</div>
</td>
</tr>
</table>
</body>
</html>
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now