473,326 Members | 2,732 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

CSS Collapsing IFrames

I'm trying to make a collapsable iframe - appears when the <a class="inlaid">LINK is clicked, closes when the user clicks outside the div. I have this working almost beautifully: the iframe and other text appear when the link is clicked but close when user clicks w/in the iframe (but not anywhere else in the div). Any suggestions on how to prevent the collapse when the iframe is clicked?

CSS:
Expand|Select|Wrap|Line Numbers
  1. .dashboard {
  2.     background: 888;
  3.     width:100%;
  4.     margin:0 auto;
  5.     padding:5px;
  6.     border:1px solid #008; 
  7.     min-height: 10px;
  8.     text-align: left;
  9. }
  10.  
  11. a.inlaid {
  12.     color:#FFF;
  13.     text-decoration:none;
  14.     outline-style:none;
  15. }
  16.  
  17. a.inlaid em {
  18.     display:none;
  19. }
  20.  
  21. a.inlaid:active, a.inlaid:focus {}
  22.  
  23. a.inlaid:active span, a.inlaid:focus span {
  24.     display:block;
  25.     background: #888888;
  26.     color: #FFF;
  27.  
  28. }
  29.  
  30. a.inlaid:active em, a.inlaid:focus em {
  31.     display:block; 
  32.     cursor:default;
  33.     height: 410px;
  34.     width: 100%;
  35. }
HTML Body:
Expand|Select|Wrap|Line Numbers
  1. <div class="dashboard">
  2. <p>
  3. <a class="inlaid" href="#more" onclick="this.hideFocus=true" onblur="this.hideFocus=false">
  4. <span>Red/Yellow/Green Weather Dashboard</span>
  5. <em>
  6. <IFRAME SRC="other.html" height="400" width="100%"></IFRAME>
  7. </em>
  8. </a>
  9. </p>
  10.  
  11. </div> <!-- end of dashboard -->
  12. <br>
  13. Bottom Text
Thanks!!!!
Feb 8 '08 #1
1 4694
Death Slaught
1,137 1GB
I don't think your problem is with your HTML or CSS. Please ask in our JavaScript forum.

(\_/)
(' . ')
(")(") , Death
Feb 8 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: maxim vexler | last post by:
I'm reading a lot of talks lately about the term iFrame and with your permission would like to ask a few question about that : - what is iFrame, i mean what is it good for ? - does all the...
0
by: Dan Popa | last post by:
Check out the following 2 links: http://www.batisdev.com/admin/test_1images.asp http://www.batisdev.com/admin/test_2images.asp First page contain 4 IFRAMES and 1 IMG tags. Second page contain 4...
0
by: Spartanicus | last post by:
I've been caught out by what I thought was an Opera 7.5p1 issue: http://www.spartanicus.utvinternet.ie/test/opera7.5p1_css_background_image_issue.htm but as was pointed out to me this is actually...
5
by: Borris | last post by:
<div style="background-color: blue; width: 500px; height: 300px"> <div style="background-color: red; margin-top: 100px; margin-left: 100px; width: 300px; height: 100px"> </div> </div> Where...
5
by: Frances | last post by:
I need to replace iframes acc. to what option user chooses in a sel obj.. but figured have to load a blank iframe when pg loads so I can replace it.. (iframe gets put in a pre-existing div..) this...
1
by: yb | last post by:
Hi, I'm looking for clarification of css 2.1 specification in section 8.3.1 "Collapsing Margins" The 6th bullet reads "If the top and bottom margins of a box are adjoining ..." I won't paste...
2
by: Guadala Harry | last post by:
1. Are IFrames supported only in uplevel versions of IE? If not IE exclusively, what browsers support IFrames? 2. Are IFrames going to be supported in the future - as far as anyone knows - or...
6
by: Jack | last post by:
Hello, I would like some advice on how to disable the behavior of treeviews to expand and collapse when double clicked upon, but still allow the user to use the plus and minus on each node. ...
19
by: wmanzo | last post by:
I have a really professional conspiracy movie site and I use tons of layers and an external scroll bar assembly. I would like to put the various sections into MS Iframes and in order to clean up...
5
by: SlowArrow | last post by:
Here collapsing seems to work differently in vb.net 2005 from that I use to see in vb.net 2003: Using the collapsing in vb.net 2003 shows the whole interface of the methods, subroutines,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.