HTML - Using Include To Make Frames?
I am starting to write a page for my site but I noticed that the <frame> attribute has been discontinued in HTML5. Since I am starting from scratch, I figured it best to try to stick to the current proper standards. So I guess i-frames is the best thing to do. I actually had the basic layout finished with using frames, only to realize they were depreciated, so I am switching to i-frames. The concept is pretty easy/generic. Example : http://img32.imageshack.us/img32/8662/diagram2q.jpg
It consists of a header and two i-frames side by side. The i-frames have me stumped as I can not seem to get them to play nicely an appear side by side. Here is the source of the page: PHP Code: <? if (!check_perms('users_mod')){ error(403); } ?> <table border="0" width="100%" height="100%"> <tr align="center" valign="top"> <? show_header('Staff Tools', 'toolbox'); ?> </tr> </table> <div class="menu"> <iframe height="100%" width="15%" style="display:inline" src="/index2.php"></iframe> </div> <div class="content"> <iframe height="100%" width="85%" style="display:inline" src="/sections/admincp2/info.php"></iframe> </div> #menu { width: 200px; float: left; } #content { float: right; margin-left: 200px; } #menu iframe, #content iframe { width: 100%; } <? ?> At this point it generates the header, but just a blank white page below it. If I click view source, I can see it is trying to load the 2 i-frames. If I remove the tables,divs, and other styling info, then everything shows up but the i-frames still will not show side by side properly. Similar Tutorials<html> Ok, I have 3 frames that take up the whole page, but the text doesnt fill them so it looks silly. How can i make everything cover only say 50% over the page and centred. also, which is better, px or %, I don't know how big px's are so thats useless here's the code for the index. <html> <head><title>title here</title></head> <frameset rows="15%,85%" border="0" frameborder="0" framespacing="0"> <frame src="title.htm" name="title" noresize scrolling="no"> <frameset cols="25%,75%" border="20" frameborder="0" framespacing="0"> <frame src="menu_bar.htm" name="sidemenu" scrolling="false"> <frame src="welcome.htm" name="mainwindow" noresize scrolling="yes"> </frameset> </framset> <noframes> Your browser does not support frames. <a href="frameless_main.htm">Please visit the frameless page.</a> </noframes> </html> Hope the title made sense, I am using Microsoft Expression Web and, I am also using Frames on my website. I have 3 Frames, One complete at the top, one on the left side and then a main page frame to fill the rest. I am using a 19" wide screen monitor, and because of that the pages I make are all unaligned with each other as they get stretched to fill the monitor. now the top frame and left frame stay where they should I have done that, but I can't keep the main page frame from moving over to the right and making everything look untidy and nasty. so could anyone help me out with this problem please, I use a background Image, text and images on the page so they all need to stay centered bu to the left of the page. Or maybe center all the frames to the middle of the screen such as www.myspace.com looks on a wide screen monitor (although i know they do not use frames.) Thanks in advance Is there code that can detect when your page is being embedded and kill the frame? hi everyone this is my first page so i will probably have a couple of questions to help give me an idea of how to do that i want! basically someone has asked me to design them a site, i did a web design course but that was 6 months ago and i need to learn new things for it as well as try and remember what ive learned! ive got a semi basic layout, ill post the html and css, hopefully ill pate them in the right way (this definitely wont be the colour scheme, ive been following an online tutorial, want to get the layout right before making other tweaks) basically in the content section theyre looking for a rectangular box that has 4 imaes, 2 side by side and two below. these will change when theyre rolled over and when a particular image is clicked it will take them to the correct section of the site. as far as i understand from the css i have the size of the content section will change depending on how much information is there. how would i know what size to make the flash for insertion into this section so it fits properly without any gaps? sorry im a bit new to this but the more i learn the better! i dont have a clue how to actually code the flash yet but getting the size right would be a good start! thanks for your help HTML Code: <link rel="stylesheet" type="text/css" href="css/master.css" /> </head> <body> <div id="page-container"> <!--this div will hold all the other elements of the page--> <div id="main-nav">Main Nav</div> <div id="header"> <h1> Kilmaclolm Dramatic Society logo to be placed here </h1> </div> <div id="sidebar-a"> <dl class="hidden"> <dt id="about"><a href="#">About</a></dt> <dt id="services"><a href="#">Services</a></dt> <dt id="portfolio"><a href="#">Portfolio</a></dt> <dt id="contact"><a href="#">Contact Us</a></dt> </dl> </div> <div id="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam gravida enim ut risus. Praesent sapien purus, ultrices a, varius ac, suscipit ut, enim. Maecenas in lectus. Donec in sapien in nibh rutrum gravida. Sed ut mauris. Fusce malesuada enim vitae lacus euismod vulputate. Nullam rhoncus mauris ac metus. Maecenas vulputate aliquam odio. Duis scelerisque justo a pede. Nam augue lorem, semper at, porta eget, placerat eget, purus. Suspendisse mattis nunc vestibulum ligula. In hac habitasse platea dictumst. </div> <div id="footer"><!--floated divs dhould come first to avoid any IE issues--> <div id="altnav"> <a href="#">About</a> - <a href="#">Services</a> - <a href="#">Portfolio</a> - <a href="#">Contact Us</a> - <a href="#">Terms of Trade</a> </div> Copyright © Kilmacolm Dramatic Society. A website by D Keenan </div> </body> </html> Code: @charset "utf-8"; /* CSS Document */ html, body { /*resets the margins and padding on both the html and body tags to 0 to ensure theres no space between the top of the browser and the top of the page */ margin: 0; padding: 0; } h1 { margin: 0; /* takes away the default margin and padding on h1 tags */ padding: 0; } .hidden { display: none; /* any element with this class wont be seen on the site */ } #page-container { /* there is a # as this is an id, to be used once on the page only, not repeated elsewhere this div's height will change depending on the content*/ margin: auto; /* browser sets margin, should centre the div */ width: 760px; /* sets the width of the container */ } #main-nav { background: red; height: 50px; /* the width doesnt need to be specified, it will be 760px as this is the with of the containing div */ } #header { background: blue; height: 150px; } #sidebar-a { float: left; /* floats sidebar to left of the screen */ background: darkgreen; /*the height is dependend on the content so no height will be set for the time being*/ width: 280px; } #content { background: green; /*the height is dependend on the content so no height will be set for the time being*/ margin-left: 280px; /*creates a margin as wide as the sidebar to separate the sidebar information and the content */ } #footer { clear:both; /*When an element has the clear property assigned, if it comes into contact with a float it is placed right below where that float ends.*/ background: orange; height: 66px; } I'm a newbie and I need help with using the #include directive. below is a sample file usinging the #include directive: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <!-- #include file="test.html" --> </body> </html> Here is the contents of test.html: <h1>header</h1> When I display the test.html in my brower the text show up. When I run the main file above with the include statement the contents of the test file will not appear. I've tried using #include virtual and I get the same results. both files reside in the same directory. How can I get the above files to work. I'm working with windows XP on a home computer. This problem occured in my actual website files becasue I want to include a header and a footer. These files of course have table tags etc in them and I get the same results where the include files contents do appear. I need help asap if that is possible. I've heard many times "don't use frames, there is better ways to accomplish it", and I was wondering, is this just referring to "invisible" frames, or any frames? For example, look at Kingdom of Loathing. They use frames (or what appears to be frames) and I can't see how they could successfully make that site without. If I had to have all the screens scroll as one rather than separate, and couldn't resize when I needed to, it would be extremely annoying. So, frames are bad, or just the invisible ones? please help me guys!!! im trying to find a html code that allows people download a pdf files from the website that im trying to make..anyone out there help me.. Hi, First time posting... I have a site that contains frames and I am applying IDs to the tables and providing links above to move further down the page but it also moves the outer frame but I would like the outer frame to remain still and for the link to scroll to the right place in the page in the inner frame. Is this possible? Thanks. Hey, so forgive me for being a bit of a newbie. Anyway, I started writing this website using frames without realizing they were deprecated. On the left side of my page I have a frame which has a menu of buttons where I've got javascript/jquery allowing the buttons to be hidden and shown in a collapse/expand sort of way. Clicking on the buttons also enables the page on the right frame to change. I like that this allows me to load a new page on the right but not reload the page on the left. Is there a way for me to not use frames but keep this left/right independence? hey last time i made a website was a few years ago, now a days, do people use frames? how is a website like hostmonster.com (my host) made? does that website have a frame? or did they something like css(which i have no clue what it is) Thanks guys, so far this forums has been helpful. Hello, I was just learned about frames and I just get a little bit curious why not so many websites use frames, is it, like, not great? Can you tell me pros and cons about it? Thank you. Hey can someone help me do something like a frame but where you could add backrounds something like this ___________________________________________________ | Insert | | Text | | and | | back | | round | | here | | | | | Hey, I'm a html noob building a website for html. I have frames set up so that it is 3 columns. In the middle column there are three rows (Header, menu and content respectively). The problem I'm having is, although I've made the frames so that they can't be dragged to alter their size, when the user resizes the window the frames get resized and all the content (including banner, menu buttons etc.) get cut off or pushed into "no mans land". Id like one of the following to be possible: - How do i make the window so it opens at a specific size, and cant be resized. - Or if the window has to be resizable, can i set a minimum point the frames can be resized to. - Or how do i make the content so that it doenst go to the s***house. - Or how do i make the frames so they aren't resized when the window is... Bellow is a picture and my coding so you can see what's wrong: (in the picture you can see the banner being cut off, the buttons havent been cut off yet as the window is still big). <body properties="fixed"> <frameset border="3" bordercolor="#000000" rows="100%"> <frameset cols="20%,60%,20%"> <frame src="backdrop.html" name="lbackdrop" noresize scrolling="no"> <frameset rows="25%,10%,65%"> <frame src="header.html" name="header" noresize scrolling="no"> <frame src="menu2.html" name="menu" noresize scrolling="no" <frame src="main.html" name="mainwindow" noresize scrolling="no" </frameset> <frame src="backdrop.html" name="rbackdrop" noresize scrolling="no"> </frameset> </frameset> </body> Thanks in advance Lock n delete. My net is stuffing up n it double posted. Please read my other post... I need help to create the frameset with the structure in the attached file. Can anyone help me please? Hi there I recieved a template from a friend for my website. I have finished most of the site i now i have a problem. I would like to offer advertising space on eaither side of the page but i cant seem to do it. Please can somebody help me out. Thank you. The website is http://www.sapokershop.co.za you will see what i mean when i say space on the sides. Hey. I have a little portfolio - and I want to add a frame (Atleast I think that's what I want to do - you can reccomend something else.) to the top of each of my portfolio contents. So the visitor isn't deviated away from my website. Am I making sense? Basically I want something, (if not exactly like it) like the frame on the top of every site in every google image search - like this: Really, I just don't want my visitors to have to press "back" in there browser to get back to my portfolio - instead, wouldn't it be better if I had that kind of frame and just stuck on some sort of banner linking to my portfolio - or even a text link. So, do any of you know of any source code, or way of doing it? Without ruining the layout? Thank you if you help. hi there i just need help with frames thing. i am abit new with this html stuff here i have three frames one at top as tittle one, at the side for menu and one the main... now wat i dont know is at the menu frame i have created a table where i have inserted pics instead of words now i want like when i click on one pic a certain file should be opened in the main frame which i have named as body.htm and not ina new window hope u are understanding wat i am trying to put here is the code of the menu page <html> <head> <title>my web</title> </head> <body background="wallpaper.jpg"> <img src="menu.gif" align="middle">*** here also i putted the align thing but still the pic comes in the side ** <table> <tr> <td><a href="body.htm"target="body.htm"> ** this is the code i used but whenever i click on the doll image the page opens in new window which i dont want..** <img border="0" src="dolls.gif"/></a></td> </tr> </table> </body> </html> hope u understand what i m trying to say. i have a menu frame in which i ahve put pics now what i want is when i click on the pic at the menu frame i want the link to open in the same window at mainframe thanks will wait for the repliess I've been struggling with this for a while now. I am trying to use framests to make a navbar and the mainpage. The frame for the navbar appears on the page, but the navbar doesn't. And the navbar says page cannot be diplayed. I am still in the early stages of learning html so I may not understand everything the first time around. This is what I have done so far. Code: <html> <head> <title>My Frameset</title> </head> <frameset cols="150,*"> <frame src= "navbar.html"> <frame src= "mainpage.html"> </frameset> </html> I have a page saved as navbar.html saved in the same folder also. Any suggestins. Thanx |