Two Plus Two Newer Archives

Two Plus Two Newer Archives (http://archives1.twoplustwo.com/index.php)
-   Computer Technical Help (http://archives1.twoplustwo.com/forumdisplay.php?f=50)
-   -   Question re CSS, HTML & navbars (http://archives1.twoplustwo.com/showthread.php?t=468641)

BluffTHIS! 08-03-2007 05:07 PM

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?

psionic storm 08-03-2007 05:59 PM

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.

Shoe Lace 08-03-2007 06:34 PM

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.

BluffTHIS! 08-03-2007 08:38 PM

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.

Shoe Lace 08-03-2007 10:05 PM

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)?


All times are GMT -4. The time now is 04:51 AM.

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