CSS - Css Positioning And Frames (again) But Different From Waht Other People Want
Hi,
Sorry that I come up again with a question about using css positioning to replace frames, but what I want seems to be quite different from what most people do. I would like to use cssp to replace frames. One site is uising frames with a top frame with the "header" of the page (image, name, some buttons, etc). This top frame should always remain visible. Below that should be a second frame. This frame should fill up the rest of the page. In frames, you can define the height of the top frame and give an * for the bottom frame, which means it fills up the rest of the page. If text runs out of that second frame, you just scroll down. With 3 collumn css positioning with a header, like on glish.com, the header always scrolls out of view if you scroll down with the text. I don't want that. I have been looking everywhere to see if I could find an example, but I can't. I have figured out most of what I want but I still end up with a bug, being the top of the scrollbar disappearing. I am hoping there is another way still with cssp to do what I want. You can see the frames version of what I want op URL and the cssp version on URL I hope anybody can help me with this. I am really desperate. Thanks, Dolf. Similar TutorialsHi, I spend many hours on the net to fix this problem, hope you can help me. I made a site with 3 frames; header, menu and main. In the menu I made a table (width and height 100%), with rows with one cell each. In each cell is a link. With some links I want to choose between more pages. So I found a nice dhtml menu, witch looks like http://dhtml-menu.com/examples/dhtml-menu-ex2.html. Everything works fine, ecxept the position of the submenus. Here is some HTML: <table><tr><td> <a href="#" target="#" onMouseOver="hideAll(); showLayer('layer1'); stopTime();" onMouseOut="startTime();">Name</a> </td></tr></talbe> ... <div id='layer1'> <a href="#" target="#" onMouseOver="stopTime();" onMouseOut="startTime();">Name</a><br> <a href="#" target="#" onMouseOver="stopTime();" onMouseOut="startTime();">Name2</a><br> </div> And here is some CSS: #layer1, #layer2, #layer3, #layer4 { position: absolute; z-index : 90; visibility : hidden; width : 150pt; left: 10pt } #layer1 { top : 0pt } Questions: 1 is it possible to position the submenu exactly next (or under or above)to the corresponding main menu item, I think it should be with relative positioning. 2 since I use frames and the menu takes the left frame, is it possible to position this submenu on the right side of the main menu item, i.e. on top of the main frame, or in the main frame. 3 I read a lot about this and many people say that a page like this should be made using tables (or CSS-P?), instead of frames. If I have to or want to change it, does that mean that I have to write a table structure in every page and when I want to change a menu item, I have tot change that in every page? Hope some can help me! I have this question and I would greatly appreciatted if somebody could help me get this out of my mind. Some time ago I learned about the benefits of css over regular tables and other old school tricks. I learned the language and learned how to program sites with it. But despite css being lighter, more indexable, faster, cleaner, etc etc. I still have one mayor problem with it and I dont know if theres a solution for. Ok my problem is that if I develop a website that is going to be updated by somebody without knowledge in html and css, how would they be able to make changes? with the traditional way of doing websites, they can always use a graphical program like dreamweaver, or front page and do the changes graphically without having to change any line of code. But since css is not displayed properly in these programs and other programs I know about. What is the best way for a non-technical person to update a css site? do you know what I mean? I know they can go to the code and change the text that has the proper id, but really, this doesnt seem like an elegant thing to do. Is there any program like dreamweaver that displays all css tags correctly? this is driving me crazy. What do big websites do about this, do they develop their own tools? thanks. I have problem with footer DIV in this layout (the order of DIV's in code after <body> should be - content, left, right, right2, header, footer - positioned centraly with fixed values): It needs to be sticked to fit after content of 4 column DIV's like it is in example. http://www.split.info/dev/less-content/ http://www.split.info/dev/more-content/ Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Title of website</title> <style type="text/css"> <!-- body {margin: 0px 0px 0px 0px; background-image:url(images/bg.jpg); background-position:center; background-repeat:repeat-y;} #wrapper {width: 1000px; margin: 0 auto; text-align: left; position: relative;} #contentPane {width: 468px; float: left; position: absolute; margin-left: 3px; padding: 0px 0px 0px 0px; background-color:#0099FF; left: 126px; top: 150px;} #leftPane {width: 125px; float: left; left: 0px; position: absolute; background-color: #99FFFF; top: 150px;} #rightPane {width: 173px; float: right; right: 226px; background-color:#999966; position: absolute; top: 150px;} #rightPane2 {width: 220px; float: right; right: 0px; background-color:#99FF00; top: 150px; position: absolute;} #headwide {background-image: url(images/head_bg.jpg); background-position: center; background-repeat: no-repeat; width: 100%; height: 142px; position: absolute; top: 0px;} #header {margin: 0pt auto; width: 1000px; background-color:#CC6600; height: 142px; } #footer {position: absolute; width: 100%; top: auto; bottom: 0px; background-color: #CCFFCC; height: 50px;} --> </style> </head> <body> <div id="wrapper"> <div id="contentPane">Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> Content area<br> </div> <div id="leftPane">Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> Left Pane area<br> </div> <div id="rightPane">Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> Right Pane area<br> </div> <div id="rightPane2">Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> Right Pane 2 area<br> </div> </div> <div id="headwide"> <div id="header">Header area</div> </div> <div id="footer"><strong>Content from above 4 column div's need to push footer DIV below (after them)! </strong>Footer area that is on bottom of div with biggest height (content, left, right or right 2 pane)... foooter follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current state like it is in this document happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So footer can be either moved in code after rightpane2 div after end of wrapper. Pls help. Thx!</div> </body> </html> Content from above 4 column div's need to push footer DIV below (after them)! Foooter need to follow right after end of content from those div's (regular behaviour of next table row below any of those 4 columns). Current issue like it is in this layout happens that if you add more data f.i. in content area (outside one screen), it will go trough footer... So in your resolution footer can be also moved in code after rightpane2 DIV, after end of wrapper. Pls help. Thx! Echo 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 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 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 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 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'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). 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 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 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. 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! 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... 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? 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 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? |