Composite control, child control backcolour issue when setting child control height.

soulboy1968

Newcomer
Joined
Sep 29, 2005
Messages
2
Have built a control with label, checkbox and multi select listbox as child controls. When control is rendered if the bgcolor of the listbox is set, either by a cssclass which I have set as a property or by setting the backcolor in code, the colour bleeds from the bottom of the control onto the page by a few pixels.

The HTML source is:

<style>SELECT.lists {
PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 11px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px; HEIGHT: 100px; BACKGROUND-COLOR: #edeaea
}
</style>

<span id="LkpMulti"><span id="LkpMulti_lblText">Non-Equality</span><input id="LkpMulti_chkNonEquality" type="checkbox" name="LkpMulti:chkNonEquality" /><select name="LkpMulti:lstLookup" size="4" multiple="multiple" id="LkpMulti_lstLookup" class="lists">
<option value="B">Branch</option>
<option value="H">Head Office</option>
<option value="S">Single Site</option>

</select></span>

The problem seems to be caused by setting the height of the child listbox either in the css or as a property of the control. If I change the height setting in the css to 'auto' the colour problem is solved. Problem is I do need a way of controling the height of the listbox. Is there a way of setting the height of the child control that will avoid this colour problem?

Andy
 
Further to my post

Having playing around I now think this is a problem with web control listboxes in IE, not the design of the composite control, as the colour problem occurs with a normal web control listbox. If you fiddle around with the height the colour bleed does lessen somewhat.

Has anyone else come across this issue.

Andy
 
Back
Top