Hello everyone, I've been unable to find any information about this problem in the documentation, Google searching and on this forum; so I'd like to submit a question or possible bug.
Whenever I create a relatively simple DIV-based layout the drop-down for WebCombo gets shifted (see example). It seems to be an issue with how the control determines the top/left values.
Is there something I'm overlooking or is this a bug?
Thank you.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>test</title></head><body> <div id="banner" style="position: relative; height: 100px; background-color: Green;"> </div> <div id="bodyStuff" style="position: relative; height: 400px; background-color: Aqua;"> <div id="navigation" style="position: absolute; width: 100px; height: 100%; background-color: Fuchsia;"> link 1<br /> link 2<br /> </div>> <div id="content" style="position: absolute; left: 100px; top: 0px; height: 100%; background-color: Yellow;"> <form id="form1" runat="server"> <igcmbo:WebCombo ID="WebCombo1" runat="server"> </igcmbo:WebCombo> </form> </div> </div></body></html>
Hi
Setting CssClass on a div:
<div id="MyDiv_id" class="divClassLayout">
And in my .css file:
div.divClassLayout{ float: left; width: 250px; height: 36px; padding: 2px; margin: 0px; font-size: small; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: normal;}
To do this programmatically (vb code):
Add runatServer to your div. <div id="MyDiv_id" runat="server" >
In your page_load or page_init:
MyDiv_id.attributes.add("class", "divClassLayout")
You may have to play about with this to get it to work correctly after postback. Try adding a
MyDiv_id.attributes.remove("class") before you add the attribute, to avoid getting duplicate attributes at runtime.
Hope this helps
PenPal1999
How did you change the container style position to fixed? I cant see a way to do that.
I found that setting the WebCombo container to "position: fixed" instead of "position: absolute" solves the problem. However I can't figure out a way to change container properties during design time. Is there any way to assign a CssClass to the container?
Thanks....