Jump to content
Xtreme .Net Talk

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


Recommended Posts

Posted

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

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...