I would like to know how do I display an html file within a div? I am hoping to be able to display a diferent page within a div (depending on which navigation button is clicked). Like if I pressed the forum button, it would be displayed within the designated div and if i pressed the blog button, it would be displayed within that same div replacing the forum. Is this possible?
I was briefly looking at your question, and my good lad (or lass, sorry I really can't tell) you have me stumped. If I recall correctly from my HTML classes (which were not as good as you might think since I had to teach myself) you were able to do that using the frameset.
Now, clearly you're trying to avoid said option (if you aren't, then you'll get an easy way out there). For those cases the "target" property is used, stating the name of the frame (or the "_blank" command, if I recall correctly) you want the link to appear in.
I'm taking the liberty of interpreting by your question, that you are looking for a way to achieve this in HTML. Frankly, I don't think it's possible to do so with XTHML and CSS only. Of course I might be wrong (I'm going to check into it, hopefully I can find you an answer). Now, it may be possible to do that kind of thing with DHTML or Javascrip or tons of those neat things I do not know. I'm sure some of the head geeks here (and I'm saying that as a compliment) will find you a way (if it is in fact possible).
Dear male ChunkyBustout:
I am glad that, however vague and void of real content, my answer could shine some light upon your problems.
What you are trying to achieved can be easily achieved using CSS and divs. Please avoid using frames. They are not search engine friendly. Not sure bout iFrames though.
Thank you all for the sugestions but I just got an idea...
What about a floating DHTML menu? No matter what page loads the menu will be there, at the top, and I don't think it will interfere with SEO or page times. Am I correct in this assumption?
Just how is this achieved through the use of CSS and divs? I've tried a bit of experimenting on my own as well as asking on irc and no one can see a way to do it with HTML and CSS. Just how would you do it?
That made me laugh like crazy. I wasn't prepared for that. (male chunkybustout!) You make me sound like a new species.
Male ChunkyBustout: [for more info on this and more wonderous species check out Animal Planet, National Geographic Channel, or just make up your own bloody description).
I'm certainly with you on that question you forwarded to our little mate here shabda. I've read quite a few things about CSS, and believe me, if not for iFrames (which quite frankly I don't remember how to put into practise) I do not remember how to achieve such results.
(( Come to think of it, my memory is getting a bit lax, isn't it? ))
In all cases, I would love to hear the developments on every party involved, since it would be a lovely resource to have as a web designer. On the matters concerning DHTML, I leave you to your luck and wish you godspeed (any god for that matter) I truly haven't delved deep into the mysteries of on-line tutorials.
Well, you can achieve this effect using an <iframe> and the "target" attribute on each link, but this is really not the best way to do things. Using frames to include page content is really not a good idea (search engines won't read the content of the iframe), and you should instead just create an html file for each section you want to have and then link to each one.
You could also use a scripting language like php to dynamically generate each section from one file, but thats a whole other story...
if you are using frames so u dont have to keep putting in the navigation then i suggest that u use PHP includes.
simply put the HTML for your nav bar in a seperate file, called nav.htm then where ever you want your nav bar to appear just put this line of code:
<?php include("nav.htm") ?> (this is assuming that u upload nav.htm into the same directory)
of course this means that the page has to be saved as a .php