Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Other Topics > Computer Technical Help

Reply
 
Thread Tools Display Modes
  #1  
Old 08-03-2007, 05:07 PM
BluffTHIS! BluffTHIS! is offline
Senior Member
 
Join Date: Nov 2004
Location: I can hold my breath longer than the Boob
Posts: 10,311
Default Question re CSS, HTML & navbars

I'm pretty sure I already know the answer will be negative, but I have a question about whether there is a way using CSS and HTML only, to create a common navigation bar for all the subpages of a website, where the style specications of same are in a css file, and the label information for the links in the navbar are also in a separate easily changed file, *instead* of on every single subpage.

I only use Nvu or handcoding in a text processor, though I have in past years fooled around with FrontPage. From my research on the net it seems the following are the ways one can make a common navbar, none of which I want to use:

1) As above, put the label information for same on every single subpage;

2) frames, the only way if I understand correctly, to have multiple html files used at once;

3) javascript (includes possible workaround option where you use js to call a file that contains html commands including NOSCRIPT - but still means users have to have java/js enabled);

4) SSIs like FrontPage extensions or other PHP stuff.


The only other workaround seems to be to use Dreamweaver to create webpages and use its library function to contain and change such information in one place, and which then when it creates the html code makes the changes throughout the code for the subpages. However I hate to spend $400 for a program whose bells and whistles I mostly wouldn't use, and for just screwing around with random webpages I don't have a huge interest in.


So my question is, other than the ways I gave above, is there in fact some other way to have a separate file contain the label information for the links in a navbar, whose style specifications are in a css file?
Reply With Quote
  #2  
Old 08-03-2007, 05:59 PM
psionic storm psionic storm is offline
Senior Member
 
Join Date: Feb 2007
Location: Hamilton, ON, Canada
Posts: 279
Default Re: Question re CSS, HTML & navbars

i cant think of anything with just css and html.

the first method that comes to mind is cgi which seems to be the most desirable and pretty simple.

its standard to implement everything server side and avoid client side stuff like javascript.
Reply With Quote
  #3  
Old 08-03-2007, 06:34 PM
Shoe Lace Shoe Lace is offline
Senior Member
 
Join Date: Sep 2004
Posts: 585
Default Re: Question re CSS, HTML & navbars

Just use SSI. Ex.

header.php
content.php
footer.php
navigation.php

Inside the header file you have your navigation file. Then your content pages include the header and footer.

Use CSS to style everything.
Reply With Quote
  #4  
Old 08-03-2007, 08:38 PM
BluffTHIS! BluffTHIS! is offline
Senior Member
 
Join Date: Nov 2004
Location: I can hold my breath longer than the Boob
Posts: 10,311
Default Re: Question re CSS, HTML & navbars

I listed SSI as a method I didn't want to use. A site I am doing for a friend is hosted on a free server that doesn't have SSI stuff available apparently. I told him that he would most likely need to use a commercial server as I only agreed to set the site up and he is supposed to maintain it, and he will have to go to a lot more trouble to make changes to the navbar and stuff without SSI support and an ability to use php. I would definitely go the php route if it were available here.

This situation though got me thinking about whether there were any pure html/ccs only solution, which as I noted in my OP I already figured there wasn't.

Thanks for the responses.
Reply With Quote
  #5  
Old 08-03-2007, 10:05 PM
Shoe Lace Shoe Lace is offline
Senior Member
 
Join Date: Sep 2004
Posts: 585
Default Re: Question re CSS, HTML & navbars

Does the host not specifically support php or do they not support SSI? There is a big difference. I believe there is a method to include files without using php/asp.

I haven't used it in forever, I think it's:
<!--#include file="navigation.html" -->

Edit: Obviously would need SSI support, but if it "apparently" doesn't support SSI this could just be a side effect of trying a php include and it failing (ie. no php support)?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:36 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.