473,791 Members | 3,251 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

navigation menu of left with CSS or PHP or ??


Hi,

Let me begin by saying that I am not an HTML expert. The most experience
I have for HTML authoring is when I made my webpages in my grad studies
at my university and some on my home computer for experiments. I am
however familiar with programming languages and am quite familiar with
Linux (use Debian Testing).

I am in the process of revamping my old old old webpage. I have decided
not to use frames for now and try to made do without them.

So far I have figured I have the choice of pure CSS or PHP with CSS to
make a navigation menu (usually on the left hand side of the webpage).
With PHP, I can make only one nagivation menu php file and include it in
all 'content' pages. With pure CSS method, I would need to keep a copy
of the CSS based menu in all the webpages.

In PHP approach, it appears I can't use an HTML editor on Linux. And in
CSS, the problem is of maintianability , once slight change in the
content may lead to a change in all HTML files which have CSS menu in
them. So which one would be better from ease of coding and
maintainability point of view? What do others use? Are there any other
methods? If possible, I would want to stay clear of Javascript and cgi
scripting.

Hope I have made my point clear, if not, I can explain further.

Thanks,
->HS
--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 26 '05 #1
10 3112
"H.S." <g_************ **@yahoo.com> writes:
however familiar with programming languages and am quite familiar with
Linux (use Debian Testing).

In PHP approach, it appears I can't use an HTML editor on Linux. And in
Please elaborate. I do a lot of PHP and HTML editing using emacs or vi
on Linux. If you use emacs, you could install the php-elisp package
and the html-helper-mode package. apt-cache also suggests august,
bluefish, gnotepad+, or gphpedit as options.
them. So which one would be better from ease of coding and
maintainability point of view?
Using some sort of templating system to generate the common blocks is
certainly better than not doing so.

PHP has cacheability issues, though (see group archives) and you might
be better using a HTML preprocessor if all you want to use scripting
for is to make page generation easier.
What do others use? Are there any other methods? If possible, I
would want to stay clear of Javascript and cgi scripting.


Preprocessing works quite well. apt-cache suggests wpp, gpp, hitop, or
write your own (for what you're doing, make+cat would be a perfectly usable
preprocessor).

--
Chris
Aug 26 '05 #2
H.S. wrote:

So far I have figured I have the choice of pure CSS or PHP with CSS to
make a navigation menu (usually on the left hand side of the webpage).
With PHP, I can make only one nagivation menu php file and include it in
all 'content' pages. With pure CSS method, I would need to keep a copy
of the CSS based menu in all the webpages.

You seem confused what PHP and CSS are. PHP is a preprocessor for
hypertext; CSS implements styles for HTML. They are completely separate
entities, related only by being used on websites.
I can highly recommend the PHP approach. I started using PHP after the
third time I made a change to a header or menu and had to edit dozens of
files to implement the change. I have never looked back.
Learning a new editor is a small price for the advantages of a
preprocessor.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Aug 26 '05 #3
[ciwas removed from the groups list, as this reply does not deal with
CSS topics]

On Fri, 26 Aug 2005 14:12:29 GMT, H.S. wrote:
I am in the process of revamping my old old old webpage. I have decided
not to use frames for now and try to made do without them.
That's a good choice.
So far I have figured I have the choice of pure CSS or PHP with CSS to
make a navigation menu (usually on the left hand side of the webpage).
With PHP, I can make only one nagivation menu php file and include it in
all 'content' pages. With pure CSS method, I would need to keep a copy
of the CSS based menu in all the webpages.


There is another option that you've missed. SSI (server side includes)
would allow you to put your pure CSS menu in a separate file and have it
included into your HTML files via a special #include comment. This is
what I do on most of my sites, and it is very simple. The downside is
that there is a little bit of processing overhead required for every
page, as they need to be examined by the server and some replacement
done, but for not-very-busy sites it shouldn't cause a noticeable hit.

There will be a little bit of server configuration required to enable
SSI. It's all very well documented at the Apache site (I'm assuming
you're running Apache since you mentioned Linux), and on many other
sites as well.

--
Greg Schmidt gr***@trawna.co m
Trawna Publications http://trawna.com/
Aug 26 '05 #4
Apparently, _Jim Moe_, on 26/08/05 12:38,typed:
So far I have figured I have the choice of pure CSS or PHP with CSS to
make a navigation menu (usually on the left hand side of the webpage).
With PHP, I can make only one nagivation menu php file and include it in
all 'content' pages. With pure CSS method, I would need to keep a copy
of the CSS based menu in all the webpages.
You seem confused what PHP and CSS are. PHP is a preprocessor for


No I am not.
hypertext; CSS implements styles for HTML. They are completely separate
entities, related only by being used on websites.
But perhaps I did not explain fully: I want to have a non-frames based
nagivation on the left hand side of my webpage, I see that (among other
methods) either I need to use a style sheet based navigation (I called
these purely CSS based) or use PHP include statement to include the HTML
code for the menu from a differnet file(which I called the PHP based
approach -- of course it would include CSS bases styling). In other
words, the underlying purpose of my query was how to make menus, using
plain CSS and div's or by using PHP as well?

I can highly recommend the PHP approach. I started using PHP after the
third time I made a change to a header or menu and had to edit dozens of
files to implement the change. I have never looked back.
Yes, that is the problem I forsee. Only that I am yet to investigate if
I can get a WYSIWYG editor (something like Mozilla Composer) that
supports PHP.
Learning a new editor is a small price for the advantages of a
preprocessor.


Learning the new editor is not a problem for me. But I am kind of
shirking to learn the innards of HTML coding. With a WYSIWYG editor, I
do not need to worry about most of the things and I can concentrate on
fine tuning my CSS files to improve the appearance. I should look into
such an editor which also supports scripts (php, javascript, etc).

->HS

--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 26 '05 #5
H.S. wrote:

Learning the new editor is not a problem for me. But I am kind of
shirking to learn the innards of HTML coding.


You shirk at learning HTML, yet you're up to coding PHP? That seems odd.

I can't fathom how you propose to code PHP *without* knowing HTML,
unless you're just using prefabricated scripts that plug-n-play, so to
speak.

If you want to test PHP rendering locally, you need to install a web
server. An editor or browser won't do it alone.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Aug 26 '05 #6
H.S. wrote:

[...] In other
words, the underlying purpose of my query was how to make menus, using
plain CSS and div's or by using PHP as well?

My method is to create a static version of a menu and work on it until
I am satisfied with it. I then create a PHP function which emits that same
code but with the possibility of zero or more options.
For instance, I commonly display all of a set of menu options. The
programmable part is where the link for the current page is disabled and
has a different appearance. It also gives another bit of feedback to the
user about where te is in the site. Statically this requires one file for
each link in the menu. With PHP it is a single function.

--
jmm dash list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Aug 27 '05 #7
Apparently, _kchayka_, on 26/08/05 13:48,typed:
H.S. wrote:
Learning the new editor is not a problem for me. But I am kind of
shirking to learn the innards of HTML coding.

You shirk at learning HTML, yet you're up to coding PHP? That seems odd.


No it doesn't if you are clear on the context of my situation. Moreover
I was not shirking, I was "kind of shirking". The story is that I needed
to get a first version of a web page up and running. If a WYSIWYG editor
could get stuff up for me and serve my purpose, that was all fine to me.
To achieve this objective, I had to read up on CSS, I did; I had to
starting learning PHP, I did. I did not need to extend my knowledge of
core HTML coding so I didn't -- and just to put the record straight, it
is not that I do not know HTML, only that I am not an advanced
programmer. In this case, I will cross the bridge when I come to it.

And also, I find it better to separate the matter from it's appearance.
I find it easier and faster to use WYSIWYG and text based editors in a
mixed fashion -- both have advantages over the other in certain situations.

I can't fathom how you propose to code PHP *without* knowing HTML,
unless you're just using prefabricated scripts that plug-n-play, so to
speak.
Where did I say I do not intend to use HTML at all?

If you want to test PHP rendering locally, you need to install a web
server. An editor or browser won't do it alone.


We have all this in our university. I have it all set up at home as
well, Debian Sid. Thank you.
->HS

--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 29 '05 #8
Apparently, _Jim Moe_, on 26/08/05 20:13,typed:
H.S. wrote:

[...] In other
words, the underlying purpose of my query was how to make menus, using
plain CSS and div's or by using PHP as well?

My method is to create a static version of a menu and work on it until
I am satisfied with it. I then create a PHP function which emits that
same code but with the possibility of zero or more options.
For instance, I commonly display all of a set of menu options. The
programmable part is where the link for the current page is disabled and
has a different appearance. It also gives another bit of feedback to the
user about where te is in the site. Statically this requires one file
for each link in the menu. With PHP it is a single function.


Yes, I have used this approach on a part of the website. I find this
better than maintaining navigation menu code in each HTML file -- so
far. I also have the purely CSS approach (without PHP) implemented as
well for a groups of webpages. I am currently comparing how both
approaches fair in case of modifications to the web pages.

thanks,
->HS

--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 29 '05 #9
Apparently, _Greg Schmidt_, on 26/08/05 12:51,typed:
[ciwas removed from the groups list, as this reply does not deal with
CSS topics]
Thanks.
<SNIP>
There is another option that you've missed. SSI (server side includes)
would allow you to put your pure CSS menu in a separate file and have it
included into your HTML files via a special #include comment. This is
what I do on most of my sites, and it is very simple. The downside is
that there is a little bit of processing overhead required for every
page, as they need to be examined by the server and some replacement
done, but for not-very-busy sites it shouldn't cause a noticeable hit.
This seems very interesting. I am going to try out this approach this week.
There will be a little bit of server configuration required to enable
SSI. It's all very well documented at the Apache site (I'm assuming
you're running Apache since you mentioned Linux), and on many other
sites as well.


Yes, you are correct.

thanks a ton,
->HS
--
Please remove the underscores ( the '_' symbols) from my email address
to obtain the correct one. Apologies, but the fudging is to remove spam.
Aug 29 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
3461
by: Vincent | last post by:
First, here is a page to help you figure out what I'm talking about: http://relinquiere.free.fr/test.html As you can see in the source of this page, the structure is the following : - a banner - a skip-to-navigation-links div - a main div with : - a div with content - navigation links in a single ul - a footer
22
11097
by: Marek Mand | last post by:
How to create a functional *flexible* UL-menu list <div> <ul> <li><a href=""></li> <li><a href=""></li> <li><a href=""></li> </ul> </div> (working in IE, Mozilla1.6, Opera7 (or maybe even in Opera6))
1
5984
by: Bryan | last post by:
I've been trying to figure out how to do this for the past 2 days and am finally tossing in the towel. No matter what I do, I just can't seem to get it to work and haven't been able to find any examples of how to do it in a more CSS-oriented way. Most of the hierarchical examples are for vertical navigation menus. Basically, I'm trying to achieve the same effect as on anthropologie.com (that's the only one that I can think of...
3
2383
by: eternalD3 | last post by:
Hi, I have a problem to get this working on Opera 7.x+. This does not need to work on older Opera browsers There are problems on rendering the sub-level navigation. It aligns right on Firefox and IE 6. Sometimes there are also some problems on IE 5 or IE 5.5. I would like the navigation to work like this:
7
627
by: H.S. | last post by:
Hi, Let me begin by saying that I am not an HTML expert. The most experience I have for HTML authoring is when I made my webpages in my grad studies at my university and some on my home computer for experiments. I am however familiar with programming languages and am quite familiar with Linux (use Debian Testing). I am in the process of revamping my old old old webpage. I have decided not to use frames for now and try to made do...
10
2561
by: EA | last post by:
I am sure I must be missing something about building navigation bars with CSS. Yes it is a very clever and efficient way to format navigation structures on simple one navigation level webs, i.e. six buttons which when clicked go to a separate web page. But here is where I must be missing something, am I right in thinking that if you wish to have nested navigation structures then each individual page of the web site must have a different...
6
16228
by: nishac | last post by:
Can anyone suggest me how to make my drop down menu work in IE7 too.Its working in other browsers.On mouse over the submenus should be displayed.Am attaching my css code hereby.Anyone please check and give a positive reply. menu HOme products support..... | | submenus p1 A p2 B.. p3... /*================= STYLES FOR THE PRIMARY NAV...
4
3989
by: tburger | last post by:
Hey everyone- This is my first post at The Scripts, but I've used the forums before for other programming issues. Hopefully, someone has some solid styling advice for me. I've now been dealing with XHTML/CSS for about a week. I'm trying to set up a website for my dad, and this navigation menu is driving me nuts. I designed this part of the site on Firefox 2.0. Here's the link: http://www.yalestartups.com/tburger/test.html
2
1771
tharden3
by: tharden3 | last post by:
I have a question for you guys, I'm designing a website. Before I go any further, I'd like to get my navigation bars on the left side up and running. The site is themed to a bumblebee 'black and yellow' color scheme with nectar and honey and all that jazz. It should actually look pretty sweet when it's all done, no pun intended ;) What I was trying to do was have the colors on the nav bars invert when you hover over them. I tried achieving this...
0
9669
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10156
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6776
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5435
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.