[CLUE-Tech] PHP or CSS question

Jed S. Baer thag at frii.com
Sat Nov 17 11:08:10 MST 2001


On Sat, 17 Nov 2001 10:32:25 -0700
Kevin Cullis <kevincu at orci.com> wrote:

> whether CSS or PHP would be best for my situation.
> 
> I'm working on a web site (actually two, not very big ones at the
> moment) and I've been thinking that CSS would help with the
> administration of the web site (i.e. making one change that affects the
> whole site, like footers, headers, etc.) and wondered if PHP would be
> the better way. How this came about was I had turned off my JAVA/SS on
> my Netscape and found once I turned on SS that some sites became normal
> (hey, I know that I'm getting lazy ;-) ). However, not one to leave
> visitors stranded who visit these sites who may have their JAVA/SS
> turned off, would PHP still provide the look I want with the "ease of
> administration" help if visitors had turned off JAVA/SS ? I have not
> moved anything to SS or PHP yet, but wanted some input from experts.

There's a degree to which this is an apples/oranges question, i.e. content
vs. presentation.

I laud your desire to not leave people stranded, and I wish more web
designers would take this approach. However, this is mostly not a PHP/CSS
issue, as an A HREF tag works regardless.

Using PHP would allow you to use the include directive to include a
standard HTML "header" section in all your pages. Then, changing the
include file would result in all pages using that include to have the same
look (mostly the body tag in use here). However, there's no doubt that CSS
is the direction to move. So, you might even combine these two approaches,
by having a stylesheet reference in the included "standard" HTML "header"
file. Part of why CSS exists is to address the issue of content vs.
presentation.

The real question becomes how far to take the usability issue. I'm
struggling a bit with this (not much though) with my personal website. The
answer I've seen in some usability guides is to choose a baseline which
works in all browsers (no JavaScript, CSS), and then enhance that using
whatever, without degrading the baseline. Regrettably, many web authors
don't do this. The difficulty lies in choosing how primitive your baseline
is.

I've given up on getting stylesheets to work with Netscape 4.7. Partially
because, philosophically, I object to having to have JavaScript enabled in
order for stylesheets to work. But then, I'm not developing commercial
sites either. At the one job I have had doing this (PHP/Oracle), we used
CSS for "presentation management".

Thinking a bit more on this, you probably want to use CSS, for the simple
reason that if not all of your pages are generated from PHP (most sites
have some static content), then you'll want to have the CSS for all of
those pages.

HTH
jed
-- 
  If R is the set of all sets which don't contain themselves,
  does R contain itself? 



More information about the clue-tech mailing list