Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 25th, 2006, 06:10 AM
Authorized User
 
Join Date: Jul 2003
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default Opening pages into divs

Hi there

I was wondering if anyone knew how to open a page into div. I am currently redesigning our website using css for the design and layout. We currently have it in frames - top navigation, side navigation and main frame (yuk!)

On our new site I have a template page with a div called mainContainer e.g.
<div id=mainContainer>page to open in here</div>

Some of our pages on our site are 'owned' by another company and currently open in the main frame, but with the redesign I want these to now open within my maniContainer div.

Does anyone know the html to do this?

Thanks in advance

Lucy xx
 
Old May 25th, 2006, 01:28 PM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey Lucy,

Div are boxes that can be vary of height width and position. They also load a lot faster and are better to maintain.

The way to learn is by checking the source of some pages that are mainly build with divs.
The best way to work is working from the outside to inside. Ill give you an example that works
you can put the following code between the body tags
Code:
<div id="container">
  <div id="banner">
  </div>
  <div id="navigation">
    <a href="">home</a>
    <a href="">links</a>
    <a href="">etc</a>
  </div>
  <div id="content"></div>
  <div id="footer"></div>
</div>
The rest of the style you will need to do in css there are enough tutorials to find online for this.

good luck



__________________________________________________ ________
This is my junk I'm gona eat it
 
Old May 26th, 2006, 04:58 AM
Authorized User
 
Join Date: Jul 2003
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello

Thanks for the reply, although the info given wasn't what I was asking! I already know about divs to the extent you've gone into - I want to know if i can get an external page to open up within my mainContainer div......say, something along the lines of <div id="mainContainer" src="displaypage.asp"></div>

So my external page looks like any other page on my site but actually the header and footer are includes, and the content from the external page opens and displays all content in this div.

Any ideas?

Lucy
 
Old May 26th, 2006, 07:32 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oops sorry I didn't read it well.

I've noticed you used the asp extension there for I think that your looking for a solution to include a file.

this is asp solution
try this
Code:
<div id="content">

</div>
keep in mind that tags like html,head, body should not be in the file you want to include

good luck

__________________________________________________ ________
This is my junk I'm gona eat it





Similar Threads
Thread Thread Starter Forum Replies Last Post
Restricting the user from opening pages gaurav_jain2403 ASP.NET 1.0 and 1.1 Professional 1 January 19th, 2007 11:12 AM
Tables or divs gujjar CSS Cascading Style Sheets 1 January 9th, 2007 08:13 AM
divs inside divs: theory? Giant_robot_sandwich CSS Cascading Style Sheets 11 September 13th, 2006 03:56 PM
opening asp.net pages naidukap ASP.NET 1.0 and 1.1 Basics 0 October 17th, 2005 11:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.