| View previous topic :: View next topic |
| Author |
Message |
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 7:37 am Opening a page inside a table.. |
|
|
|
I have a basic website layout created. A Nagivation bar on the left side and a main content area in which content from the selected option in the Navbar will be displayed. I am using HTML tables to create the site and need to know what procedures I need to take to achieve opening the selected option in the main content area.
I have some questions here:
- Do I need to create a seperate .htm file for each area of the website e.g: one for the navigation, one for the content area. At present I only have the index.htm page.
- If so, can someone give me the basic coding used for the areas in the above question?
- Finally the code for opening a page in a perticular table.
Thank you for your help!  |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
Posted: Sun Oct 16, 2005 7:57 am |
|
|
|
|
Are you wanting to use frames? It seems that is what you are trying to allude to - but frames are not all that great, especially for search engines, etc |
|
jdrasq
Joined: 24 Apr 2005 Posts: 38 Location: UK
|
Posted: Sun Oct 16, 2005 8:04 am |
|
|
|
Yes, it would be best for you to create new pages. This way, you know where everything is and it is quicker loading,
One way to open the new page within the original is to use iframes, then when a user presses on one of the links then it will open the new page within the original page, the code you would need for this is as follows
In the <body> section, where you want the iframe to be positioned
| Code: |
| <iframe name="iframe1" height="500" width="500" frameborder="1"></iframe> |
Then, on your button
| Code: |
| <a href="page url" target="iframe1"> </a> |
OK?
JDRasq |
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 8:05 am |
|
|
|
Hey Corey. Thanks for getting back. What would you suggest to use? This the site that I have at the moment http://www.freewebs.com/fulhamish/ The layout was not created by me, however I am able to create layouts. I just didnt know where to start with all the coding. Any tutional sites would help greating with the proposed new method of coding you may have.
Thank you once again
Amir |
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 8:07 am |
|
|
|
Thanks JD. I can understand the coding you have given me and about the positioning. However, would i need to start over all my code creating iframes for each part of the layout.. E.g the Navigation/content area.
http://www.freewebs.com/fulhamish/ Thats what I have at the moment, feel free to look at the code. (The original code was created by the layout maker, I have adjusted slightly, adding my banner in etc) |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
Posted: Sun Oct 16, 2005 8:13 am |
|
|
|
Well if you just copy your code - you will have a new page. And then you just place your content in there.
Tutorials - besides this site - there is the W3 Schools |
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 8:26 am |
|
|
|
Thanks for the help guys. One final question. Inside the first code that JD gave me above, how would I change the background colour and also position the iframe correctly on the page?
Thank you.. Amir |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
Posted: Sun Oct 16, 2005 8:47 am |
|
|
|
Well the code would be more like
| Code: |
<iframe name="contents" src="main.html" height="500" width="500">
|
and the you would change the body background on main.html |
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 8:59 am |
|
|
|
| Thanks corey. How would I position the iframe correctly and make it transparent? Cheers for the help mate. |
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
Posted: Sun Oct 16, 2005 9:02 am |
|
|
|
enjoy
| Code: |
| <iframe name="contents" src="main.html" height="500" width="500" align="center"> |
|
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
Posted: Sun Oct 16, 2005 9:10 am |
|
|
|
Is there anymore I can do other than centering it? I need the iFrame to cover exactly over my layouts given content box. Cant i specify a pixel length from the top of the page, and so on with from the side of the page? If so please help.
Cheers Superpetauction! |
|
Superpetauction

Joined: 07 Oct 2005 Posts: 47 Location: Logansport, Indiana
|
Posted: Sun Oct 16, 2005 10:15 am |
|
|
|
is this what you are looking for
| Code: |
| <iframe name="contents" src="main.html" WIDTH="500"HEIGHT="500"MARGINWIDTH="0" MARGINHEIGHT="0" FRAMEBORDER="yes"SCROLLING="YES"> |
|
|
jdrasq
Joined: 24 Apr 2005 Posts: 38 Location: UK
|
Posted: Mon Oct 17, 2005 7:00 am |
|
|
|
Hi,
Is everything sorted now?
JDRasq |
|
amirtavoussi
Joined: 13 Oct 2005 Posts: 8 Location: London, UK
|
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8749 Location: Castle Pines North, CO USA
|
Posted: Tue Oct 18, 2005 10:33 am |
|
|
|
Sorry I mised this response for some reason, but check your DOCTYPE since you are using frames now and also check some of your font tags - they are still opened.
Once you get used to HTML, consider switching to CSS to control your fonts since the font tag is deprecated |
|
|