Fill a cell with a control -- how the heck?

G

Guest

I want to fill a cell in a table with a control. Lets say the control is a
listbox--something that you'd think would easily fill a cell, which would be
a good thing. So I create the table and stick the control inside, setting
its width and height to 100%. When I run the application, the control
appears to be an arbitrary size, each edge a different distance from its
relative edge. So, I go into the properties for the cell and set all margins
and padding to 0 pixels and try again. Same difference. Its enough to make
you say WTMF?! I can't find any info on doing this in google groups or
anywhere else. How can I do this? TIA!
 
T

Tom A via DotNetMonster.com

OK, basic question first: do you have any CSS setting for your tables / rows
/ cells? Could be that something there may be overriding your .aspx settings
for the TD.
 
G

Guest

<td id="cellDocuments" style="BORDER-RIGHT: black 1px solid; PADDING-RIGHT:
0px; BORDER-TOP: black 1px solid; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px;
MARGIN: 0px; BORDER-LEFT: black 1px solid; WIDTH: 323px; PADDING-TOP: 0px;
BORDER-BOTTOM: black 1px solid; HEIGHT: 194px" vAlign="top" align="left"
width="323" bgColor="#00ffff" height="194">
<!-- MSCellType="NavBody" -->
<select name="lbDocuments" size="4" id="lbDocuments"
style="height:100%;width:100%;">
</select></td>
The HTML matches what I put in VS, but still the listbox does not fill the
cell. There is a space of about five pixels on the left and bottom, and the
listbox is clipped by the cell on the right. Expanding the window stretches
the cell until the whole listbox is shown, which seems to be a constant width
of something around 300 pixels. "height:100%;width:100%;" does not do what
you would expect it to do.
 
E

Eliyahu Goldin

It will help if you examine the html output to see how the listbox renders
inside the cell.

Eliyahu
 
E

Eliyahu Goldin

The html looks ok. I would have another look at all css rules as the other
poster suggested.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top