Solved

css not working for modalpopup extender IE7

Posted on 2010-11-17
3
1,126 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

710 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