SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Threaded View

  1. #1
    SitePoint Evangelist
    Join Date
    Jan 2001
    Location
    earth
    Posts
    501
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Trouble displaying/hiding DIV

    Hello! Need some help here, and .. let's see if I can properly explain it.


    I've two tabs ( A + B ) when you enter info A is display, and info B is hidden.
    The problems are:

    #Browser Opera: The tabs change colors after clicking, but the information B is not show.

    #When using Flash Files inside the div the info is overlapping, with images is all OK:



    Here is the JS code:
    Code JavaScript:
    <script language="javascript">
    function muda(oid){
        if(oid=="selected"){
            temp = document.getElementById(oid);
            document.getElementById("unselected").id = "selected";
            temp.id="unselected";
            document.getElementById("contentweb").style.display.block;
        } else {
            temp = document.getElementById(oid);
            document.getElementById("selected").id = "unselected";
            temp.id="selected";
            document.getElementById("contentilustration").style.display.hidden;
        }
    }
    </script>

    And the HTML is:
    HTML Code:
    <div class="tab">
                <h1><a href="#c1" id="selected" onclick="muda(this.id);">Web Design</a></h1>
                <h1><a href="#c2" id="unselected" onclick="muda(this.id);">Illustration</a></h1>
            </div>    
            
            <div id="containerbox">
                <a name="c1" id="c1"></a>
                <div class="contentweb">
      <img src="webdesignimg/webhome02.jpg">
                        <h1>Lorem Ipsum</h1>
                </div>
                    <a name="c2" id="c2"></a>
                
      <div class="contentilustration"> 
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="260" height="90">
          <param name="movie" value="webdesignimg/webswf.swf">
          <param name="quality" value="high">
          <embed src="webdesignimg/webswf.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="260" height="90"></embed></object>
                </div>
            </div>
    And here the CSS, if need it:
    HTML Code:
    #containerbox { width: 740px; height:200px; overflow: hidden; }
    
    .contentweb {
        height: 200px;
        background: url("webdesignimg/ilustrasquare.gif") repeat;
        padding: 15px;
        text-align:left;
        }
        
        .contentilustration {
        height: 200px;
        background: url("webdesignimg/ilustrasquare.gif") repeat;
        padding: 15px;
        text-align:left;
        }
    Thanks for the help!! Really appreciate.
    Last edited by magi; Jul 19, 2008 at 12:37.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •