Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 09-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
  CSS new starter

Hi, always just used HTML and Frontpage but am moving into using Dreamwaver and also CSS.

SO I have been looking at the CSS tutorials on the web and have a question that I have not been able to answer yet and I am sure someone on here can advise.

I have many pages all with the same layout and navigation bar, the layout is 2 columns across the full width on the first row and below it is one row of three columns,

Anyway ...........

I will use external CSS for changes to styles etc., but can I use CSS to call up a file that has the navigation menu bar info so that if I want to change the position or add more options, there will only be one file to change.

I know that I could do this with frames but I do NOT want to use them.

What can I do ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-09-06
accelerator's Avatar
Online shopping rocks!
 
Join Date: Nov 2004
Location: England
Posts: 1,314
Thanks: 8
Thanked 29 Times in 26 Posts
accelerator is an unknown quantity at this point
Quote:
Originally Posted by renamecor
can I use CSS to call up a file that has the navigation menu bar info so that if I want to change the position or add more options, there will only be one file to change.
The conventional way to have your navigation in one file is to use a scripting language and an include file. E.g. you could use php and have the nav in a php include file, or vb.net and have the nav in an asp.net user control.

I am not sure whether something like this could be achieved through CSS, but would recommend the Sitepoint CSS forums at:

http://www.sitepoint.com/forums/forumdisplay.php?f=53

for such a query.

Rgds

Accelerator
__________________
WebRef.eu - Web Development Resources for the Online Entrepreneur
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-09-06
Registered User
 
Join Date: Jun 2004
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
amcd78 is an unknown quantity at this point
I would go along with accelerator regarding using include files for your navigation - its the easiest way to do what you are wanting.

I would also recommend the book Cascading Style Sheets: Separating Presentation from Content as a really useful resource for learning about CSS.
http://www.friendsofed.com/book.html?isbn=159059231X
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
  Php

OK guys, not familiar with PHP but have started learning it following your suggestion.

An include file for the nav bar in PHP looks the way to go.

So as stated previously, my pages are all the same, made up of tables with the left menu containing the navigation links (in a cell).

I assume I need to replace the current HTML in that cell with a piece of PHP to call up another file (containing the new menu), if that is correct then what would the command or script be ?

Also, the new menu file to be called, can that be HTML or does it need to be in PHP too.

Cheers for your patience with this novice )
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
<?php require_once('menu.php'); ?>
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
So the menu file need to be PHP also,

What is the PHP command/script for page links, e.g. in html it would be ;

<a href="link_to_here">link to here</a>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
Quote:
Originally Posted by renamecor
So the menu file need to be PHP also,

What is the PHP command/script for page links, e.g. in html it would be ;

<a href="link_to_here">link to here</a>
Just create a new page. Call it something like menu.php. Add the page links to the menu.php or whatever you've called as normal links. Load it into your target page with an include - the code I used in a previous reply works fine. Save the page as index.php or whatever.

You will need a testing server to see the links in action. Either upload it to your hosting or better - run a local apache/php install on your PC
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #8 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
Cheers, done that but all I keep getting is a blank space where the menu.php should be.

I included NISMO's include code into the original HTML page but that cell is now just blank.

I had a quick look on my hosting setup and PHP is included (I am with Heart Internet).

If anyone has the patience (with me) and a few minutes, perhpas you could have a look at my URL

http://www.carbasics.co.uk/index_copy.php

Cheers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
Sorry, I don't follow.

I can see a whole bunch of links at the top of the page - are these the ones you are using?
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
Yes, when I previously posted I was looking at the wrong page version, been playing with a few things and got my browser windows mixed up.

The menu links that are in the top left should be showing up in the left-hand white cell under the website logo, that is where the include code has been put.

How can I force it to that position ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #11 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Oct 2005
Posts: 426
Thanks: 0
Thanked 0 Times in 0 Posts
Nosmo_King is an unknown quantity at this point
By simply putting you include in that cell
__________________
Travel Domains for sale: luxuryhotelparis.co.uk italytravelguide.co.uk bettertravel.co.uk america-flights.co.uk bargainairline.co.uk costaricahotel.co.uk hotelsintallinn.co.uk
Pm me for prices.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-09-06
Registered User
 
Join Date: Mar 2006
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
renamecor is an unknown quantity at this point
that is where I put it, just checked the position in the html with a bit of plain text.

any suggestions?
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati