Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: CSS Frames not display correctly

  1. #1
    Join Date
    Mar 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default CSS Frames not display correctly

    Hi All, i have tried to change an example showed in dynamicdrive.com, the example were saying "Left and Top Frames Layout"... I'm needing a "Top and Left Frames Layout", so i have tried to modify the code to get a 100% top row and leftmost column (X - TopRowSize)...
    Everytime i get the top row that not fully fit the 100% of the page.

    There's the link to the example and the code that i have modified:

    http://www.dynamicdrive.com/style/la...-frames-layout

    Code:
    body{
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    }
    
    #framecontentTop, #framecontentLeft{
    position: absolute;
    top: 0;
    left: 0;
    height: 200px;
    width: 100%;
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: navy;
    color: white;
    }
    
    #framecontentLeft{
    top: 200px; /*Set top value to HeightOfTopFrameDiv*/
    bottom: 0;
    height: auto;
    width: 220px; /*Width of left frame div*/
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: green;
    color: white;
    }
    
    #maincontent{
    position: fixed;
    left: 220px; /*Set left value to WidthOfLeftFrameDiv*/
    top: 200px; /*Set top value to HeightOfTopFrameDiv*/
    right: 0;
    bottom: 0;
    overflow: auto;
    background: #fff;
    }
    
    .innertube{
    margin: 10px; /*Margins for inner DIV inside each DIV (to provide padding)*/
    }
    
    * html body{ /*IE6 hack*/
    padding: 200px 0 0 220px; /*Set value to (HeightOfTopFrameDiv 0 0 WidthOfLeftFrameDiv)*/
    }
    
    * html #maincontent{ /*IE6 hack*/
    height: 100%;
    width: 100%;
    }
    
    * html #framecontentLeft{ /*IE6 hack*/
    height: 100%;
    }
    And obviously i have to make it function in IE7, at least...

    Any suggestion plz? Thx
    Last edited by maxlamax; 03-17-2010 at 02:47 PM. Reason: Forget browser release and type.

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Do you have a link to the page, or the HTMl code? It could be inside a container, such as a div, which would explain the reason it doesn't stretch across.

    Or other factors. I don't see a blatant problem with your CSS, so my guess is either I missed something, or it's in the HTMl.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  3. #3
    Join Date
    Mar 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    As you request... Thx a lot...

    Code:
    <!--Force IE6 into quirks mode with this comment tag-->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Dynamic Drive: CSS Left and Right Frames Layout</title>
    <link rel="stylesheet" type="text/css" href="stile.css">
    
    <script type="text/javascript">
    /*** Temporary text filler function. Remove when deploying template. ***/
    var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"]
    function filltext(words){
    for (var i=0; i<words; i++)
    document.write(gibberish[Math.floor(Math.random()*3)]+" ")
    }
    </script>
    
    </head>
    
    <body>
    
    <div id="framecontentLeft">
    <div class="innertube">
    
    <h1>CSS Left and Right Frames Layout</h1>
    <h3>Sample text here</h3>
    
    </div>
    </div>
    
    <div id="framecontentTop">
    <div class="innertube">
    
    <h3>Sample text here</h3>
    
    </div>
    </div>
    
    
    <div id="maincontent">
    <div class="innertube">
    
    <h1>Dynamic Drive CSS Library</h1>
    <p><script type="text/javascript">filltext(255)</script></p>
    <p style="text-align: center">Credits: <a href="http://www.dynamicdrive.com/style/">Dynamic Drive CSS Library</a></p>
    
    </div>
    </div>
    
    
    </body>
    </html>
    Do you seen anything wrong?

    I see in the browser something like this:
    _______________________________
    |aaaaaaaaaaaaaaaaaaaaaaaaa|__?_|
    |_________________________|__?_|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa| Fig.1
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |______|_______________________|

    Instead of:

    _______________________________
    |aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
    |______________________________|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa| Fig.2
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |______|_______________________|

    Why????

    P.S. Feel free to submit another code that can make something like Fig.2...
    Last edited by maxlamax; 03-17-2010 at 11:22 PM.

  4. #4
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Found it! Don't ask me why because I do not know the answer...

    In your CSS, find this line:

    Code:
    width: 100%;
    for the Top frame declarations....

    change it to:

    Code:
    width: 150%;
    Viola! In IE the blue is all the way across the screen... and because content overflow is hidden... no bottom scroll bar! No change in FF, Chrome, Opera... so you should be set.

    If you are worried about the 150% I played with it for a bit and anything OVER 130% will work, But the further from 130 you get the better. 140 works okay too, but I haven't tested on a wide screen monitor yet. So I would stick with at least 150%.

    Hope it helps!
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  5. The Following User Says Thank You to BLiZZaRD For This Useful Post:

    maxlamax (03-18-2010)

  6. #5
    Join Date
    Mar 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by BLiZZaRD View Post
    Found it! Don't ask me why because I do not know the answer...

    In your CSS, find this line:

    Code:
    width: 100%;
    for the Top frame declarations....

    change it to:

    Code:
    width: 150%;
    Viola! In IE the blue is all the way across the screen... and because content overflow is hidden... no bottom scroll bar! No change in FF, Chrome, Opera... so you should be set.

    If you are worried about the 150% I played with it for a bit and anything OVER 130% will work, But the further from 130 you get the better. 140 works okay too, but I haven't tested on a wide screen monitor yet. So I would stick with at least 150%.

    Hope it helps!
    OMG!!!!

    This is insane... It's against the nature itself...

    Thx a lot BLiZZaRD really, but if you have time try to create a CSS template to make a frameset like Fig.2... I can't accept that a stupid template like that is so hard to code, but i'm not enough expert to write it so... If you have time...

    Cya

  7. #6
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    0
    Thanked 9 Times in 9 Posts

    Default

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Dynamic Drive: CSS Left and Right Frames Layout</title>
    <link rel="stylesheet" type="text/css" href="stile.css">
    <script type="text/javascript">
    /*** Temporary text filler function. Remove when deploying template. ***/
    var gibberish=["This is just some filler text", "Welcome to Dynamic Drive CSS Library", "Demo content nothing to read here"]
    function filltext(words){
    for (var i=0; i<words; i++)
    document.write(gibberish[Math.floor(Math.random()*3)]+" ")}
    </script>
    <style>
    body{
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    }
    #framecontentTop0 {
    position: absolute;
    top: 0;
    right: 0;
    //left: 770;
    height: 200px;
    width: 20%;
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color:red;
    color: yellow;
    }
    #framecontentTop, #framecontentLeft{
    position: absolute;
    top: 0;
    left: 0;
    height: 200px;
    width: 80%;
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: navy;
    color: white;}
    #framecontentLeft{
    top: 200px; /*Set top value to HeightOfTopFrameDiv*/
    bottom: 0;
    height: auto;
    width: 220px; /*Width of left frame div*/
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: green;color: white;}
    #maincontent{
    position: fixed;
    left: 220px; /*Set left value to WidthOfLeftFrameDiv*/
    top: 200px; /*Set top value to HeightOfTopFrameDiv*/
    right: 0;
    bottom: 0;
    overflow: auto;
    background: #fff;
    }
    .innertube{
    margin: 10px; /*Margins for inner DIV inside each DIV (to provide padding)*/
    }
    * html body{ /*IE6 hack*/
    padding: 200px 0 0 220px; /*Set value to (HeightOfTopFrameDiv 0 0 WidthOfLeftFrameDiv)*/
    }
    * html #maincontent{ /*IE6 hack*/
    height: 100%;width: 100%;}
    * html #framecontentLeft{ /*IE6 hack*/
    height: 100%;
    }</style>
    </head>
    <body>
    <div id="framecontentLeft">
    <div class="innertube">
    <h1>CSS Left and Right Frames Layout</h1>
    <h3>Sample text here</h3>
    </div>
    </div>
    <div id="framecontentTop">
    <div class="innertube">
    <h3>Sample text here</h3>
    </div>
    </div>
    <div id="framecontentTop0">
    <div class="innertube">
    <h3>Sample textnnnnnnnnnnnn here</h3>
    </div>
    </div>
    <div id="maincontent">
    <div class="innertube">
    <h1>Dynamic Drive CSS Library</h1>
    <p><script type="text/javascript">filltext(255)</script></p>
    <p style="text-align: center">Credits: <a href="http://www.dynamicdrive.com/style/">Dynamic Drive CSS Library</a></p>
    </div>
    </div>
    </body>
    </html>

  8. #7
    Join Date
    Mar 2010
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thx stringcugu ... But i still don't understand why it's not possible to make a CSS frameset like this:

    Code:
    ________________________________
    |aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
    |______________________________|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |______|_______________________|
    when it's so simple to make this one:

    Code:
    ________________________________
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|_______________________|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |aaaaaa|aaaaaaaaaaaaaaaaaaaaaaa|
    |______|_______________________|
    If someone have any ides plz post...

  9. #8
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by maxlamax View Post
    Thx a lot BLiZZaRD really, but if you have time try to create a CSS template to make a frameset like Fig.2...
    I don't follow? The fix I gave you above does make it look like fig. 2.. the top blue is all the way across the screen, the green side is to the left and below the blue, and the white content area is taking up the rest. What's the problem?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  10. #9
    Join Date
    Aug 2009
    Posts
    92
    Thanks
    0
    Thanked 9 Times in 9 Posts

    Default

    not Fig.1 Fig.2
    now Fig.3------play with
    ---top: 0;right: 0;//left: 770;height: 200px;width: 79%;-----

    #framecontentTop0 {
    position: absolute;
    top: 0;
    right: 0;
    //left: 770;
    height: 200px;
    width: 79%; hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color:red;
    color: yellow;
    }
    #framecontentTop, #framecontentLeft{
    position: absolute;
    top: 0;
    left: 220;
    height: 20px;
    width: 20%;
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: navy;
    color: white;
    }

    #framecontentLeft{
    top: 0px; /*Set top value to HeightOfTopFrameDiv*/
    bottom: 0;
    height: auto;
    width: 220px; /*Width of left frame div*/
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: green;
    color: white;
    }

  11. #10
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Code:
    width: 79%; hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    Should be:

    Code:
    width: 79%; 
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    I see that right off the bat.

    What I don't see is a Fig3, or know exactly what it is you want now.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •