CSS - How Can I Simulate Frames Using Css
Hi:
What I need to do is to have a 3 column design, left column should contain the navigation and the center main content. When the user clicks on the navigation boutton it should bring a set of thumnails of images in the right column. And clicking on any thumbnail should bring a larger image and detail of that image in the center column. I could do this using frames but I want to avoid using frames. I never used CSS before and read lot about positioning layers but couldn't quite figure out how I can target the links to open in the same page as I wanted. The way I have it opens in a new window which is not what I wanted. I want the navigation, center and right column to be visible all the time. What should I do in the following html or CSS to achieve that. Code: <html> <head> <title> Testing</title> <link rel="stylesheet" type="text/css" href="./test.css"> <script language="javascript"> new Image().src="./QTimages/image2b.jpg"; </script> </head> <body> <div id="header"> <img src="../QTimages/banner8.jpg" width="300" height="50" alt="header image"> </div> <div id="menu"> <br><br><br><br><br><br><br> <a href="./images.html"><img name="imagebutton" id="imagebutton" src="../QTimages/image2.jpg" onMouseOver="document.images['imagebutton'].src='../QTimages/image2b.jpg'" onMouseOut="document.images['imagebutton'].src='../QTimages/image2.jpg'" border="0"background="transparent"></a> </div> <div id="content"> <h1>Welcome to my site...</h1> </div> <div id="thumbnail"> Testing </div> </body> </html> CSS code: Code: #header { position: absolute; top: 0px; left: 350px; } #menu { position: absolute; top: 0px; left: 10px; width: 0px; height: 100%;} #content { position: relative; top: 60px; left: 180px; width: 80%; height: 100%; background-color: #FFFAAA; color: #000EED"} #thumbnail { position: absolute; top:50px; right:0px; height: 100%; background-image: url("../QTimages/background.jpg"); background-repeat: repeat-y z-index: 3; } And also the right column is not positioning right.. Any help is greatly appreciated. Thanks mayflower Similar TutorialsUggghhh, I hate it when seemingly simple things turn out to be very difficult. Ok, so I'm tasked with creating a newsletter and I have an image that I'm floating and there are words around the image. At least there are when you look at it in a browser or any email client other than Office 2007. Office 2007 apparently (just learned this today) now uses the Word engine instead of Internet Explorer. Float (among many, many, MANY other things) is not supported. Is there an equivalent to float? To try and simulate float, I put the images and words in a table and did a reasonable job...when viewed by a browser!!! Honestly, I try to be OS agnostic and just use these things as tools to get my job done. But Microsoft has proved time and again that they have no qualms about completely changing the rules and not supporting previous stuff. I mean, we're talking basic html here!!! Ok, rant over. Anybody have any suggestions on how to simulate a float? Thanks in advance. Hi, i wonder how to get a table behav like this (example: http://help.live.com) what is this layout called??? css frames? or something else? only css can do the job or we will need javascript as well??? You got link to ne tutorial or ne working example?? please help thnx Having issues with this. I need this page & cross browser -------------------- - W-100% H-121px - <--- non-Scrolling -------------------- -#############- <--- W - 100px -#############- <--- H - auto -#############- <--- Scrolling -#############- -------------------- Im using frames now, it was a quick fix. for what I needed. now I got to get away from from them. I need this to be full screen and resizeable Thanks for any help you can offer Thanks I need to create a page that has a header that takes up 20% of the page and the other 80% of the page will be tables. The issue is that the header must not move and the other 80% will be scrollable. I know how to implement this with frames but I understand that frames are looked down upon now in proper html/xhtml design. Can this be accomplished using css? If so how? Thanks in advance. SO I am using overflow : auto; in my content div. While my header div is a fixed height. The goal - a header that is static (positionally) and only the rest of the page under this header being scrollable. Easy to do with frames. Seemingly easy to do with CSS unless, you resize the browser window! Then boink* theres that outside scrollbar again! Or maybe my user has a 15'' monitor w/ 600x400.... Again 2 scrollbars. I hate that outside scrollbar and want to it to just go away! I have tried playing with the body element to no avail. Must I use javascript to detect the screen size, detect resizes and dynamically alter my height values to make this play nicely.? Any input or direction to a nice tute would be great!!!! thanks devshed-people. Hi everyone, I am in the midst of converting my fathers website from an old frames based version into a CSS version, and I have had some trouble getting it working properly in both firefox and ie explorer. I would really appreciate if anyone could give me some advice! The original page is he http://www.qualspec.com.au I have started by just trying to replicate the frames look with css, and have come up with this single page: http://www.qualspec.com.au/test/testid.html It seems to work well in internet explorer, but as soon as I load up firefox, it looks ugly as hell (I was using topstyle which uses IE as the internal css and html preview). Can anyone help me out here? Thanks in advance! Regards, Thomas. I'm pretty new to CSS - I muddle through it. But I've started on a personal project outside of work and picked up Eric Meyer's CSS book as my main resource. I'm also using SiteMesh as my page decorator. I'm not quite sure how to do the layout for the web application as envisioned. The design is to have a header with tabs, a side panel with a tree, a main contents panel, a bottom panel with a set of icons, and a basic footer. The contents panel would need a scroll wheel if the contents was to long for display. In addition, it would be wise to have a scroll wheel appear if the user expanded the tree too long as well. ______________ |xxxxxxxxxxxxxx| |--------------- |x |................| |x |................| |x |................| |x |................| |--------------| |xxxxxxxxxxxxxx| |--------------| |--------------| With CSS layering & positions, I've been able to get most of a rough UI. However, it seems that to have proper scrolling I'll need to break the pages up with frames. At the same time, it sounds as if frames have become as much of a no-no as the infamous goto statement has for application developers. So what do people advise? Thanks! P.S. I'm sure this can be done with CSS <div> tags, but I better mention it. I'll need to update the panels (tree, main, bottom) if an action occurs in another one - just like how a file browser will update the tree if you open a directory through the main window (and vise versa). Hello. I have a site I would in the past have used an I-frame for content so it could be added and automatically place a scrollbar if needed. I also used them when a client needed me to set up user editable content [php would be set to populate the html page showing in the frame] I'm sure there's a better way to do this now, but I haven't figured it out being so new to css. one application I'd like to use this in is this site: http://greentypeoftube.com/div/home1.html in the 'content' area. last I checked there's no cross platform/browser way to control the color and style of scrollbars. it's been a few months since I checked though. if anyone has info on that as well, I'd love to hear about it. thankyou, you will be my hero although I am unable to sing like the girl who sang the hero song in the movie. s I've seen several examples of how to emulate frames using CSS, but I haven't seen anywhere explain how to create "frames" without having to add the entire frame code to every page in which it appears. With frames, I used to be able to create a menu which would appear throughout my site. I would modify the one, single menu.html file, and the changes would be visible throughout the site. How can I do this using the CSS-emulated frames? Thanks Got a quick question from a newbie. Thanks to a kind member, I've just been assisted in creating my first HTML5/CSS 3.0 page. It has a footer that extends vertically with content. I have several pages that will be updated that will be changed frequently. In my world of tables, I would simply create an inline frame to display them, and have ease of quick editing. The questions I have are 1) is there a CSS alternative to have mulitlple links display different content in a particular frame or div? 2) With either that alternative OR inline frames, is there a way to make it dynamic, meaning instead of scrolling, it extends downward and pushes the footer down as content grows? 3) if so, how would I accomplish this? I need an emulation of two frames. The left is for menu and is fixed and always visible and the right is for content. I intended to use this http://soiland.no/frames_with_css/scroll page as an example but I'm puzzled by one thing: when browsers load this page from the above server everything is OK, but when I open downloaded (by IE5) page with Opera 7.54u1 I have a gap of about 16px between the right window edge and the scrollbar of the right block. Could anyone open this page from HDD and tell about the result here? Does anyone have a handy snippet I could slip into my stylesheet to make a particular (named) frame print by default? I've heard that using CSS in this way can solve the 'printing every frame' problem in IE, but my CSS knowledge is very, very rudimentary.... Thanks in advance! The layout in question: Page: http://www.westeros.org/ASoWS/index-Frames.html CSS (general): http://www.westeros.org/ASoWS/ASoWS-All-Frames.css CSS (IE): http://www.westeros.org/ASoWS/ASoWS-IE.css In Mozilla the above CSS 'frames' layout is mostly working, save that I can't figure out a way to hide the text above the header and below the footer. Is that at all doable with this layout? In IE, however, the header, footer and sidecolumns are all over the place. I have another CSS 'frames' layout (see the links below), which does work in IE, and part of the problem with the new layout seems to be that IE really doesn't like having left and right values specified for the header and footer. However, without those, I don't know how to make sure that they start and stop 10px away from the edge. Any workarounds for that that anyone can think of? Old CSS 'frames' layout (does work in IE): Page: http://www.westeros.org/BoD/ CSS (general): http://www.westeros.org/BoD/BoD-All.css CSS (IE): http://www.westeros.org/BoD/BoD-IE.css What I need is as follows div - height:150px width:100%; div - height: *; width:100%;overflow;scroll div - height:150px width:100% I can get this to work if the top and bottom divs are set to lets say 15% and the middle is set to 70% but I want the top and bottom "bars" to keep their size while the middle shrinks The middle row is supposed to scroll horizontally btw and vertically if necessary This is to replicate what we are currently using with 3 frames I can get the "layout" with tables but the scrolling (horizontal) of the middle row wont work. I'd rather not use tables anyway. Any suggestions? I'm working on a web app that includes a wysiwyg html/css editor. The idea is that people can use the editor to create a webpage. Seems simple enough. The trick is that I want all webpages created to have a small header at the top. Basically a 15-20px tall navigation strip. Currently, I have it setup so that people can create pages using the editor, but as it is now, the header is simply inserted as an 'included document' when they view the page they created. Depending on the complexity of the page they make, they CSS, and formatting of the banner could affect how their page is displayed. Even as simple as pushing their content down 15pixels and mis-aligning content they may have set against their background. I'd also like to try and prevent user code from affecting how the header is rendered. I'm hoping there is a way to seperate the rendering of the header and the user content in the browser. Basically, I'd like the css rendering of the user's content to start BELOW the header, rather than the header being combined with the user content. If a user creates a page that has their own header and it's set to be fixed to the top, it would basically cover up my header. I'm hoping that any element they would fix to the top would be fixed BELOW the header I insert. This almost seems like a job for 'html frames'. With HTML frames, I could basically split the page into two rendered browser pages. Is there a CSS alternative to this? Hello, I'm developing an intranet forum system with a design similar to Google Groups i.e. a sidebar with links to each message in the current thread, and a main content area to display the actual messages. Each area, i.e. the sidebar and the main content area, is a DIV. I have set the sidebar to width:25% and the main area left:25%, width:75%. My problem comes when I want each area to scroll (the main area vertically, and the sidebar horizontally). My plan is to use overflow:auto; this works fine with the main content area, but with the sidebar the text wraps around onto a new line if it overflows the DIV. This appears to be because the text is "hitting" the other DIV, i.e. the main content area, forcing it onto a new line. So can I do this using DIVs or do I have to resort to frames (I hope not, frames are SO messy and long-winded compared to DIVs....) Thanks, Nick Ok, i've tried to start replacing frames with CSS and Divs. But, how can i make a page where, I have a top menu bar of say 150px high and a bottom menu of 17px high and then have the middle bit filled with the rest? ie --------------------------------------------------------- 150px --------------------------------------------------------- 'x' px to fill rest of screen depending on its size --------------------------------------------------------- 17px bottom border --------------------------------------------------------- Top bits fine, set height to 150px no problem (fixed to fit an image perfectly). But I'm not sure about the next bit. is there a way to set an image to sit at the bottom of a screen or bottom of a Div. Come to think of it, is there a way to make a Div go from the bottom of the topmenu section to the bottom of a screen without starting to scroll, ie just fit in the remaining section. The Frames equivalent of what i'm looking at is <frames cols="150,*,17"> and how can i do the * is the question. Thanks for your help again! Mif... here comes the code: the frame set code: Code: <frameset rows="50,*"> <frame class="top" name="top" src="top.html" frameborder="0" scrolling="no" noresize> <frameset cols="100,*"> <frame class="left" name="leftFrame" src="menu.html" frameborder="0" scrolling="no" noresize marginwidth="0"> <frame class="right" name="rightFrame" src="wweams.html" frameborder="0"> </frameset> and the stylesheet adding a dashed border: Code: frame.top { border-bottom-style: dashed; border-width: 1px; } frame.left { border-right-style: dashed; border-width: 1px; } now when I load this in IE 6.0 it works fine, but in netscape 7.1 the dashed borders just don't show? what the deal yo? -raymond Hi, I'm building a music-based site and the client really wants a flash music player on the header of the site. I'm not a fan of this but this is the requirement - so I'm trying to figure out if there is a way to make a "frame" based site in CSS, so that the music player never has to reload? I'm not really looking for the effect of frames where only a part of your browser scrolls. I am only looking to make the flash player load once and once only, no matter which page you visit on the website. Otherwise, if it is pure HTML/CSS - then the flash player would be reloaded on every new page visit. Is my only option here to use frames? Many thanks Hi- I have a site that has a side navigation. I am using a php include for the navigation but it means that the navigation has to reload for every new page, and that can't happen. Is there any new solution that will do what frames (yuck) used to do in html - where the navigation can stay static throughout the site (1 copy) and not reload. thanks in advance Shawn |