chanveil Posted January 27, 2011 Share Posted January 27, 2011 I'm in the middle of learning CSS and am stuck with the job of migrating a frames based design to CSS. If it is possible, what is the basic CSS technique to accomplish the following:Assume a CSS designed page with a banner, sidebar and main content. When a link is executed off this page, how is it possible to keep the banner and sidebar the same and replace the main content with the contents of the executed link?Appreciate any offered suggestions. Link to comment Share on other sites More sharing options...
sunziun Posted January 27, 2011 Share Posted January 27, 2011 hi chanveil,my understanding of your question is that you would need iframes.You place an iframe in the area where content should be viewed. <a href="path/to/link.html" target="maincontent">Link</a><iframe name="maincontent"></iframe> The link target and the iframe name most be identical!PS: Your question relates to HTML not to CSS forum Link to comment Share on other sites More sharing options...
thescientist Posted January 27, 2011 Share Posted January 27, 2011 actually, you're inquiry requires two kinds of languages. CSS and javascript/AJAX. I would use modern CSS styling to create the structure of your page using floats, padding, and margin. I would have a container div, and inside have a banner container, and then a content container. Inside that, float the menu bar either left or right, depending on where you need it go. And then have a content div padded accordingly. You should be able to Google two column website CSS and get lots of examples.To accomplish the task of reloading content dynamically, a good option would be to use AJAX. You can use it create a connection with the server to retrieve a page, content from a database, or something like that, and have it displayed in a particular part of the page. Link to comment Share on other sites More sharing options...
Iyohi Posted September 9, 2011 Share Posted September 9, 2011 This code works in the .css file for an Iframe in the main pages iframe{border:5px solid #b69874; width:700; height:320;} But I can't seem to get it to work without the border, but it should work or maybe try the floating idea for graphics, but I don't know anything about that, just started trying to figure out css yesterday. Good luck Chanveil! Link to comment Share on other sites More sharing options...
Ingolme Posted September 9, 2011 Share Posted September 9, 2011 In today's websites, you actually load a new page that looks identical to the previous one except with different content. It hardly seems like anything is changing but the content because the stylesheet and images are stored in cache and load very quickly. Link to comment Share on other sites More sharing options...
Synook Posted September 14, 2011 Share Posted September 14, 2011 The idea is that you use a server-side language to construct the page from several different actual files, including ones for the (unchanging) banner and sidebar, and a different one for each page. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.