C#/ASP.NET: Panel border does not paint...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShadowLocke
    New Member
    • Jan 2008
    • 116

    C#/ASP.NET: Panel border does not paint...

    This is a weird one. I have a page that has two Panels on it with BorderStyle set to double. In design mode everything looks as it should. When I start the page up or move it to a production server, the borders on the Panel do not show up unless you first minimize the browser and bring it back up or move a window over it/force the window to repaint. I thought maybe it was just my comp but i see it on any IE6 computer. Firefox and Safari paint the border no problem.

    Has anyone seen this before??


    [HTML] <asp:Panel ID="Panel1" runat="server" BorderStyle="Do uble" Height="185px" Style="left: 27px; position: absolute; top: 163px; z-index: 101;" Width="335px">

    <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 3px; position: absolute; top: 8px; text-align: center;" Text="Candidate s by specialty" Width="330px" />

    <select id="sel_special ty" runat="server" style="position : absolute; left: 62px; width: 212px; top: 33px;">
    </select>

    <input type="button" id="btn_special ty_report" runat="server" value="Show All" style="left: 84px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('S PEC', document.getEle mentById('sel_s pecialty').valu e)" />
    <input type="button" id="btn_a_by_sp ec" runat="server" value="Show A candidates" style="left: 84px; position: absolute; top: 105px; width: 169px; height: 24px;" onclick="return Excel_Export('A SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
    <input type="button" id="btn_b_by_sp ec" runat="server" value="Show B candidates" style="left: 84px; position: absolute; top: 143px; width: 169px; height: 24px;" onclick="return Excel_Export('B SPEC', document.getEle mentById('sel_s pecialty').valu e)" />

    </asp:Panel>

    <asp:Panel ID="Panel2" runat="server" BorderStyle="Do uble" Height="185px" Style="left: 393px; position: absolute; top: 163px; z-index: 104;" Width="335px">
    <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 2px; position: absolute; top: 8px; text-align: center;" Text="Pending Actions" Width="331px" />

    <input type="button" id="btn_pss" runat="server" value="Pending PSS" style="left: 83px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('P SS', '')" />
    <input type="button" id="btn_late" runat="server" value='Expired "Next Action"' style="left: 83px; position: absolute; top: 105px; text-align: center; width: 169px; height: 24px;" onclick="return Excel_Export('E NA', '')" />
    </asp:Panel>

    <iframe id="ifr_downloa d" style="visibili ty: hidden; width: 46px; height: 40px; position: absolute; top: 409px; left: 17px; z-index: 103;"></iframe>[/HTML]
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    I've not seen this particular problem before but it would probably be helpful to see the mark-up that this code generates. Take a look at the html source, find the appropriate part (your asp:Panel will have been turned into a div) and see what style settings it has.

    Dr B

    Comment

    • ShadowLocke
      New Member
      • Jan 2008
      • 116

      #3
      Originally posted by DrBunchman
      I've not seen this particular problem before but it would probably be helpful to see the mark-up that this code generates. Take a look at the html source, find the appropriate part (your asp:Panel will have been turned into a div) and see what style settings it has.

      Dr B
      It seemed to be correct..I even took at the ASP code and put the HTML div in myself.

      this is what was being generated for each Panel:
      [HTML]<div id="div1" style="left: 27px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 101; border-style: Double">
      ...
      </div>[/HTML]

      I stripped the page of javascript, and an include virtual which was my header and it still does it!
      Heres the stripped page (also, i took out the panels and changed border-style to just border):

      [HTML]<%@ Page Language="C#" AutoEventWireup ="true" CodeFile="Repor ts.aspx.cs" Inherits="Repor ts" %>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">

      <html xmlns="http://www.w3.org/1999/xhtml" >
      <head runat="server">
      <title>Report s</title>
      </head>
      <body scroll="yes" bgcolor="#f3f8f f">
      <form id="form1" runat="server">
      <!--stripped javascript-->
      <asp:Button ID="btn_back" runat="server" Height="27px" OnClick="btn_ba ck_Click" Style="z-index: 100; left: 207px; position: absolute; top: 46px" Text="Home" Width="78px" />

      <div id="div1" style="left: 27px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 101; border: double">
      <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 3px; position: absolute; top: 8px; text-align: center;" Text="Candidate s by specialty" Width="330px" />

      <select id="sel_special ty" runat="server" style="position : absolute; left: 62px; width: 212px; top: 33px;">
      </select>

      <input type="button" id="btn_special ty_report" runat="server" value="Show All" style="left: 84px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('S PEC', document.getEle mentById('sel_s pecialty').valu e)" />
      <input type="button" id="btn_a_by_sp ec" runat="server" value="Show A candidates" style="left: 84px; position: absolute; top: 105px; width: 169px; height: 24px;" onclick="return Excel_Export('A SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
      <input type="button" id="btn_b_by_sp ec" runat="server" value="Show B candidates" style="left: 84px; position: absolute; top: 143px; width: 169px; height: 24px;" onclick="return Excel_Export('B SPEC', document.getEle mentById('sel_s pecialty').valu e)" />
      </div>

      <div id="div2" style="left: 393px; position: absolute; top: 163px; width: 335px; height: 185px; z-index: 104; border: double">
      <asp:Label ID="Label4" runat="server" Font-Bold="True" Font-Names="Microsof t Sans Serif" Height="20px" Style="left: 2px; position: absolute; top: 8px; text-align: center;" Text="Pending Actions" Width="331px" />

      <input type="button" id="btn_pss" runat="server" value="Pending PSS" style="left: 83px; position: absolute; top: 68px; width: 169px; height: 24px;" onclick="return Excel_Export('P SS', '')" />
      <input type="button" id="btn_late" runat="server" value="Overdue response" style="left: 83px; position: absolute; top: 105px; text-align: center; width: 169px; height: 24px;" onclick="return Excel_Export('E NA', '')" />
      </div>

      <iframe id="ifr_downloa d" style="visibili ty: hidden; width: 46px; height: 40px; position: absolute; top: 409px; left: 17px; z-index: 103;">
      </iframe>

      </form>
      </body>
      </html>[/HTML]

      I also stripped the code behind file down to nothing.

      What I have done to fix this issue is put a second div inside of the first with border: double and it works good enough for me. But please, by all means have a crack at it. If you see whats wrong let me know!

      Comment

      • jrusso1202
        New Member
        • Dec 2009
        • 1

        #4
        Here's how to fix this properly:


        fieldset{
        padding: 0.2em 0.5em;
        border:1px solid green;
        color:green;
        font-size:90%;
        text-align:right;
        }


        Put this code into your css file, or the css markup on the page.

        Comment

        Working...