Results 1 to 23 of 23

Thread: [RESOLVED] styling within frames

  1. #1

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Resolved [RESOLVED] styling within frames

    im having trouble styling the position of my frame. also wenever i click one of the links i want to display in the frame, besides it not displaying in the frame it doesnt show the styles set in the css style sheet. can anyone help me out ?

  2. #2
    Fanatic Member
    Join Date
    Jan 2005
    Location
    In front of this pc.
    Posts
    580

    Re: styling within frames

    Are you including the css in the frame's source code?

    If the link doesn't open in the frame perhaps you have a target attribute included in the link? i.e. "target=_new" or something similar?

  3. #3

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    this is my frame <iframe src='html-framed.php' name='contents' scrolling='auto'
    width='500' height='500'>
    </iframe> i have the css source code in the <head> element. where should i put the css code in the frame source?

  4. #4
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    The CSS code needs to be in the <head> of html-framed.php.

    And whenever you want a link to open in that frame it needs to be like this:
    HTML Code:
    <a href="mypage.html" target="contents">blah</a>
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  5. #5

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    ok the links now work in the frame and the frame shows the styles (the style sheet name didnt match the link) but i cant get the iframe in the position i want it in. using css how could i get move it?

  6. #6
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    Blah, I have been doing too mcuh VB and am out of the habbit of CSS. Let me go refresh my memory.

    What is the iFrame contained in? Just the page? Or in a table cell or what?

    Can you attach your source?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  7. #7

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    its just on a standard page. everything else is workin but i cant get the frame to move. wat do u mean by source? (sry im kinda new)

  8. #8
    Fanatic Member
    Join Date
    Jan 2005
    Location
    In front of this pc.
    Posts
    580

    Re: styling within frames

    I probably can't help you much with using CSS to control the position of the frame....I'm kinda behind the times on CSS usage myself

    eyeRmonkey was asking you to upload the html (including the CSS) of the page you are working on.

  9. #9

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    heres the frame page ... <div id='frame'>
    <iframe src='html-framed.php' name='contents' scrolling='auto'
    width='500' height='500' noresize marginheight='0' marginwidth='0'
    frameborder='1' border='0'>
    </iframe>
    </div>
    and heres the css part of it
    #frame {
    position:absolute; top:20% left:40%;
    }

  10. #10

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    i was also wonderin since im usiin iframes do i need a frameset doctype? or is the html transitional the better choice

  11. #11
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    iframe doesn't count as frames. Your doctype only needs to be frameset one the page the holds your frames (normal frames) and every other page should still be transitional or strict.

    I wouldn't use position absolute to position it, the results are always weird. Try using margin and either a % or a fixed with (px). Let me know how that works.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  12. #12

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    y does position absolute come out weird? it worked out for all the other things on my site

  13. #13
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    I don't know, I perfer to use relative measurements, that way if the container changes, I can predict how the things it contain will change. If it works for you thats fine. It is easier when you do everything absolute like you are though instead of just a few things absolute.

    Did you get it to work yet?
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  14. #14

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    no its not workin yet, the id on the frames matches the id in the styles but its not moving from the top left corner. i set height and width within the frame tag and that worx fine but with css absolute positioning and the float property arent working. is something not matching?
    Last edited by ninjanutz; Aug 6th, 2005 at 12:45 AM.

  15. #15

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    i tired using the id and its actualy name atribute that the other pages use to link into it but neither one works to format the frame with css. i still dont understand why i cant get it positioned to the bottom right.
    Last edited by ninjanutz; Aug 7th, 2005 at 09:16 PM.

  16. #16

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    is anyone there to help?

  17. #17
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    Sorry, I was gone for the weekend. Can you upload your source code please? Add it as attachment to your post.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  18. #18

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    attach is bein weird cause the extensions are differnt (i used php extensions caus ei wanna have some php stuff on here)
    heres the frame page...

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" 
    "http://www.w3.org/TR/REC-html40/loose.dtd">
    
    <html xml:lang='en' lang='en'>
    
    <head>
    <title>Distorted View's Site</title>
    
    <meta http-equiv='Content-Type' content='text/html;charset=utf-8'>
    <meta name='keywords' content='band, ninjanutz, distorted view>
    <meta name='description' content='We are a band called Distorted View 
    and it is our pleasure to bring you great music.'
    <meta name='author' content='ninjanutz'>
    <meta name='robots' content='noarchive'>
    
    <link rel='stylesheet' type='text/css' href='frame-styles.css' media='screen'>
    </head>
    
    <body>
    <div class='header'>
    <h1> Welcome to Distorted View</h1>
    </div>
    
    <div class='navigation'>
    <h4>Links</h4>
    <b><a href='html-framed.php' target='contents' title='Home' tabindex='1' accesskey='z'>
    Home</a>
    <a href='register-framed.php' target='contents' title='Join our Community' tabindex='1' accesskey='x'>
    Register</a>
    <a href='members-framed.php' target='contents' title='See Whose Who' tabindex='1' accesskey='c'>
    Members</a>
    <a href='contact-framed.php' target='contents' title='Message Us' tabindex='1' accesskey='v'>
    Contact Us</a></b>
    </div>
    
    <div id='frame'>
    <iframe src='html-framed.php' name='contents' scrolling='auto'
    width='500' height='500' noresize marginheight='0' marginwidth='0'
    frameborder='1' border='0'>
    </iframe>
    </div>
    <noframes>
    <div class='navigation'>
    <h4>Links</h4>
    <b><a href='html-framed.php' title='Home' tabindex='1' accesskey='z'>
    Home</a>
    <a href='register-framed.php' title='Join our Community' tabindex='1' accesskey='x'>
    Register</a>
    <a href='members-framed.php' title='See Whose Who' tabindex='1' accesskey='c'>
    Members</a>
    <a href='contact-framed.php' title='Message Us' tabindex='1' accesskey='v'>
    Contact Us</a></b>
    </div>
    
    
    <div class='counter'>
    <?php    
    $filename = "site.txt";    
    $whattoread = @fopen($filename, "r") or die("Error opening");    
    $contents = fread($whattoread, filesize($filename));    
    fclose($whattoread);    
    $contents = ($contents + 1);    
    $whattoread = @fopen($filename, "w") or die("Error opening count file1");    
    @fwrite($whattoread, $contents) or die("Error saving");    
    fclose($whattoread);    
    echo $contents, " visitors";    
    ?>
    </div>
    
    </body>
    </html>
    and heres the style sheet...

    /*styles for framed site*/

    Code:
    body {
         cursor:crosshair;
         background: #000000 url()
         fixed} body {
         background-image: url('http://img158.echo.cx/img158/3412/danny7jv.gif');
         background-repeat: no-repeat;
         background-attachment: fixed;
         background-position: 20% 20%;
         } 
    .header {
            color:red;
            font-family:'Copperplate Gothic Bold';
            font-weight:normal;
            white-space:nowrap;
            letter-spacing:.4em;
            text-align:center;
            border-bottom: 1px solid #FFFFFF;
            padding:0;
            margin:0;
            background-color:transparent;
            position:absolute; top:10px; left:15%;
            }
    .navigation a {
                  display:block;
                  }
    .navigation {
                color:red;
                font-family:'Bradley Hand ITC';
                font-weight:bold;
                letter-spacing:normal;
                text-align:center;
                border-bottom:1px solid #FFFFFF;
                border-right:1px solid #FFFFFF;
                padding-right:2%;
                padding-bottom:10%;
                margin:0;
                background-color:transparent;
                position:absolute; top:11%; left:2%;
                }
    contents {
           backround-color:transparent;
           position:absolute; top:20% left:40%;
           }
    .chat {
          color:red;
          font-family:'Garamond';
          font-weight:bold;
          font-size:normal;
          letter-spacing:normal;
          text-align:center;
          border:none;
          padding:0;
          margin:0;
          background-color:transparent;
          position:absolute; top:25%; left:15%;
          }
    ul {
       color:red;
       font-family:'Sylfaen';
       font-weight:bold;
       font-size:normal;
       letter-spacing:normal;
       text-align:center;
       list-style-type:none;
       border:none;
       padding:0;
       margin:0;
       background-color:transparent;
       position:absolute; top:25%; left: 35%;
       } 
    #register {color:red;
              font-family:'Tempus Sans ITC'
              font-weight:bold;
              font-size:normal;
              letter-spacing:normal;
              text-align:normal;
              border:none;
              padding:0;
              margin:0;
              background-color:transparent;
              position:absolute; top:15%; left:20%; right:27%;
              }
    h3 {
       color:red;
       font-family:'Copperplate Gothic Bold'
       font-weight:normal;
       font-size:normal;
       letter-spacing:normal;
       text-align:left;
       border:none;
       padding:0;
       margin:0;
       background-color:transparent;
       position:absolute; top:15%; left:15%;
       }
    #contact {
             color:red;
             font-family:'Perpetua';
             font-weight:bold;
             font-size:normal;
             letter-spacing:normal;
             text-align:center;
             border:none;
             padding:0;
             margin:0;
             background-color:transparent;
             position:absolute; top:25%; left:35%;
             }
    .counter {
             color:red;
             font-family:'Eurostile';
             font-weight:bold;
             font-size:normal;
             letter-spacing:normal;
             text-align:left;
             border:1px solid #FFFFFF;
             padding:0;
             margin:0;
             background-color:transparent;
             position:absolute; top: 95%; left: 2%;
             }
    
    /*styles for all links*/
    a:link {
           color: blue; text-decoration:none;
           } 
    a:visited {
              color: orange; text-decoration:none;
              } 
    a:focus {
            color: yellow; text-decoration:none;
            } 
    a:hover {
            color: green; text-decoration:underline;
            } 
    a:active{
            color: white; text-decoration:none;
            }
    this is the frame part on the styles ...
    contents {
    backround-color:transparent;
    position:absolute; top:20% left:40%;
    }
    the name attribut is contents the id is frame...neither work for formatting

  19. #19
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: styling within frames

    I am really tired tonight, but I will have a look at it in the morning for sure.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  20. #20

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    alright cool theres no rush but its kinda frustratin to look at it and now no wats wrong

  21. #21

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: styling within frames

    after all that i was missin a little ; in the css for the frame. i feel retarted.

    thanx for all ur help

  22. #22
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: [RESOLVED] styling within frames

    No problem. I'm glad you figured it out. I have done that myself quite a few times. Let me know if you ever need more help.

    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

  23. #23

    Thread Starter
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: [RESOLVED] styling within frames

    k i will thanx

Posting Permissions

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



Click Here to Expand Forum to Full Width