Solved

css not working for modalpopup extender IE7

Posted on 2010-11-17
3
1,123 Views
Last Modified: 2012-05-10
I am trying to use a modalPopup extender but am having problems with it displaying the correct colours from my CSS in IE7.  It works in Safari. Chrome and Firefox but not IE7.

I have a button:

<asp:Button ID="btnAddFolder" runat="server" Text="Add Folder"  OnClick="btnAddFolder_Click" />

A Panel

<asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Width="233px" style="display:none;" >
    Hello
       <div align="center">
      <asp:Button ID="OkButton" runat="server" Text="OK" />
      <asp:Button ID="CancelButton" runat="server" Text="Cancel" />
   </div>
   </asp:Panel>

My Extender

<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="btnAddFolder" PopupControlID="Panel1" BackgroundCssClass="modalBackground" OkControlID="OkButton" CancelControlID="CancelButton" />

and finally the CSS

.modalBackground
{
    background-color:Gray;  
    filter:alpha(opacity=80);
     opacity:0.8;

}


.modalPopup {
      background-color:#ffffdd;
      border-width:3px;
      border-style:solid;
      border-color:Gray;
      padding:3px;
      width:250px;
}

Basically when i push the button i want my panel to popup and greyout the background of my main webpage.  My panel will have a yellow background.  At the moment the popup is displaying, the main webpage is still visiable (not greyed out) and the background is transparent which means i can still see the text from main page.
0
Comment
Question by:Media01
3 Comments
 
LVL 26

Expert Comment

by:Alan Warren
ID: 34162044
Hi Media01,
your modal popup actually works fine for me here, using ie8, at first I thought it was because I have a Conditional IF css block in my master page, but it worked even if created a new page that does not inherit the master page.


Although if I cause a compile error by removing an end tag for an asp control on the page, I get a few css related errors.
Error      1      Validation (CSS 2.0): 'filter' is not a known CSS property name.
Error      2      Validation (CSS 2.0): 'opacity' is not a known CSS property name.

Conditional IF
  <!--[if IE]>
  <style type='text/css' media='screen' lang='en-au'>
    .modalBackground {background-color:Gray;filter:alpha(opacity=70)}
    .modalPopup {background-color:yellow;border-width:3px;border-style:solid;border-color:Gray;padding:3px;width:500px;}
  </style>
  <![endif]-->

hth


Alan

0
 
LVL 12

Expert Comment

by:jagssidurala
ID: 34183390
Find the attached jquery pop up. which will work in all the browsers.

Place all files in same folder.


Default.aspx.txt
jquery-1.4.2.min.txt
Popup.js.txt
India.jpg
0
 
LVL 29

Accepted Solution

by:
Kumaraswamy R earned 500 total points
ID: 34281232
0

Featured Post

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question