• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 291
  • Last Modified:

Why panel BackColor does not show?

I have panel define as

 <asp:Panel ID="pagerpanel" runat="server" GroupingText="Open a Pager" style="display:none" Font-Size="Smaller" BackColor="#F2F4FE" BorderColor="#F4FAFE">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>    
   ....
   ....

But the BackColor does not show no matter what color I changed to. I also removed the style property, the BackColor still not shows. I have attached the file. Please help.
I have the same panel definition on other pages. It shows on other pages without a problem.

BackColorNotShow.aspx
0
minglelinch
Asked:
minglelinch
  • 2
  • 2
1 Solution
 
Bill NolanCommented:
You have to give the panel a discrete size.  E.g.,

Width="100px"
Height="100px"
0
 
Bill NolanCommented:
"Discrete" may not be best word choice, as you could also use

Width="50%"

...perhaps "distinct" or "defined"?  lol
0
 
Easwaran ParamasivamCommented:
You have to set width and height attributes. Please check http://asp-net-example.blogspot.com/2009/04/how-to-set-change-panel-backcolor.html
0
 
minglelinchAuthor Commented:
I tried to set Width and Height, it still does not work out. Then I found it is due to the area outside of the panel shows the same color, which makes the panel back color does not show, since it's a light color.

Eventually it turns out IE 7 and IE8 display. If I switch it to IE7, it works out expected.

Thank you all for the comments.
0
 
minglelinchAuthor Commented:
I made it work.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now