RE: [PHP-DB] CSS versus Includes

2001-04-02 Thread Steve Farmer

Hi All,

You can also do ..

   if(strpos($HTTP_SERVER_VARS["HTTP_USER_AGENT"], "Macintosh")):
$mysite_style = "mysite_mac.css"; /* MACINTOSH */
   else:
$mysite_style = "mysite_win.css"; /*WINDOZE */
   endif;
   echo "";

So you can combines both browsers and OS's

Regards
Steve Farmer

At 11:31 AM +0100 2/4/01, [EMAIL PROTECTED] wrote:
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Disposition: inline; filename="BDY.RTF"
>   ;Creation-Date="Mon, 2 Apr 2001 11:31:14 +0100"
>
>One of the benefits to including a css (as opposed to LINK REL...) is
>that you can pre-process the CSS file with PHP.
>
>e.g.
>
>my_css.phtml:
>
>
>
>
>
>or even more useful:
>
>if ($Browser='IE')
>{
>   include "ie.css";
>}
>
>else
>{
>   include "other.css";
>}
>
>Hope this helps.
>   _ 
>
>~ Richard Allsebrook ~
>Applications Developer and Webmaster
>Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
>http://www.easysoft.com   -
>http://www.cinema.com 
>"A computer lets you make more mistakes faster than any invention in
>human history - with the possible exceptions of handguns and tequila."
>
>

-- 
---
"Minds are like parachutes, they work best when open"
Support free speech; visit http://www.efa.org.au/

Heads Together Systems Pty Ltd http://www.hts.com.au
Email: [EMAIL PROTECTED] Tel: 612 9982 6767 Fax: 612 9981 3081 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] CSS versus Includes

2001-04-02 Thread richarda
 BDY.RTF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP-DB] CSS versus Includes

2001-04-02 Thread Rubanowicz, Lisa

Hi there,
you can also do it this way using Javascript

if (navigator.appName == "Netscape") {
StyleSheet = "netstyle.css"
} else {
StyleSheet = "iestyle.css"
}


document.write('<link rel=stylesheet type="text/css" href="'
+StyleSheet + '">')

All the Best
Lisa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 02, 2001 11:31 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] CSS versus Includes


One of the benefits to including a css (as opposed to LINK REL...) is
that you can pre-process the CSS file with PHP.

e.g.

my_css.phtml:


<!--
P ( color: <? echo $MyPHPColorSetting ?> };
-->


or even more useful:

if ($Browser='IE')
{
  include "ie.css";
}

else
{
  include "other.css";
}

Hope this helps.
  _  

~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
http://www.easysoft.com <http://www.easysoft.com>  -
http://www.cinema.com <http://www.cinema.com> 
"A computer lets you make more mistakes faster than any invention in
human history - with the possible exceptions of handguns and tequila."

  _  

 



-Original Message-
From: mbraynard [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 31, 2001 12:45 AM
To: php-db
Cc: mbraynard
Subject: FW: [PHP-DB] CSS versus Includes


I have found that includes work just about as well. Any suggestions on
going
with one or the other?





RE: [PHP-DB] CSS versus Includes

2001-04-02 Thread richarda
 BDY.RTF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP-DB] CSS versus Includes

2001-04-01 Thread Dan Fitzpatrick

Matt,

I recommend using separate style sheets. This is especially important
when your users are browsing a record set, say 10 records at a time.
There is no need to pass them the style sheet embedded in the PHP page
for every page view. If the stylesheet is a file on the file system, it
is more efficient for the server to serve that than parse a PHP page. In
addition, most CSS files are not dynamic (some are). Since they are not
dynamic in most cases they may as well be cached by the browser. If
style is embedded in the PHP page and you have no-cache headers in your
PHP then you will be passing this redundant data over and over again to
the browser. If it is a separate flat file on the file system, it will
have a real mod date and the web server and browser can determine when a
fresh copy is needed.

My 2 cents.

Dan

Matt wrote...
> When I asked the question, what I meant was should I use the includes to
> hold page style details or a CSS file. And someone who understood that this
> was not an apples and oranges situation but one of approach answered that
> Netscape was not fully supportive of CSS and suggested includes may be the
> way to go.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] CSS versus Includes

2001-04-01 Thread Boclair


"Matt Braynard" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
| When I asked the question, what I meant was should I use the
includes to
| hold page style details or a CSS file. And someone who understood
that this
| was not an apples and oranges situation but one of approach answered
that
| Netscape was not fully supportive of CSS and suggested includes may
be the
| way to go.

Whether you link to an external stylesheet, embed a style block or
declare the styles in-line is a matter for author management of the
CSS property declarations.  The use of includes or scripting  the
actual link, block or inline styling in the document does not matter a
wit.

Importantly, if the styling is included, the interpretation is still
done by the client browser.  Whether includes or in-document coding
are used, the restrictions and bugs and failure to parse, where
invalid markup or styling is involved, still apply.

What I do notice, however, with some Nav4x browsers, that escaping the
quotes on class names in printf() causes these browsers to sometimes
escape the whole class declaration.
eg.

printf('
%s
%s
%s
%s
%s

', $myrow['id'], $myrow['lname'],  $myrow['fname'],$myrow['logon'],
$myrow['logoff']);

The solution for some documents is to write as such
%s

How this will affect xml documents I am not sure

Also with tables, if the data is being extracted from a database, as
above, and the data in a particular field row is null, the td cell
styling background will collapse with Nav4x browsers.  This might be
solved by a conditional statement inserting some content where the
database row/field content is null, or constructing the database table
with pseudo content, such as   as the default for fields likely
to have null content.

Sorry, but my experience is that oranges are oranges and apples and
apples are apples.  Nice thought!  but I do not think you can get out
of browser non-compliance by using PHP.

Tim Morris



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] CSS versus Includes

2001-04-01 Thread Matt Braynard

When I asked the question, what I meant was should I use the includes to
hold page style details or a CSS file. And someone who understood that this
was not an apples and oranges situation but one of approach answered that
Netscape was not fully supportive of CSS and suggested includes may be the
way to go.


 -Original Message-
From:   Patrick Dunford [mailto:[EMAIL PROTECTED]]
Sent:   Sunday, April 01, 2001 6:58 PM
To: [EMAIL PROTECTED]
Subject:RE: [PHP-DB] CSS versus Includes

On 31 Mar 2001 13:19:45 -0800 AD in php.db, Michael Geier said:

>this post is about apples and oranges...
>
>CSS (Cascading Style Sheets) have nothing to do with includes.
>They only have to do with formatting elements on a web page.
>They can be written inside the document, or can referenced
>externally via a  tag.
>
>Includes can be anything from a configuration file, a block of
>text, or a header or footer statement that works across multiple
>pages, so you don't have to duplicate code.

Including a CSS :)


--
===
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   Now to him who is able to do immeasurably more than all we ask
or imagine, according to his power that is at work within us,   to
him be glory in the church and in Christ Jesus throughout all
generations, for ever and ever! Amen.
-- Ephesians 3:20-21
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010331
===
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] CSS versus Includes

2001-04-01 Thread Patrick Dunford

On 31 Mar 2001 13:19:45 -0800 AD in php.db, Michael Geier said: 

>this post is about apples and oranges...
>
>CSS (Cascading Style Sheets) have nothing to do with includes.
>They only have to do with formatting elements on a web page.
>They can be written inside the document, or can referenced
>externally via a  tag.
>
>Includes can be anything from a configuration file, a block of
>text, or a header or footer statement that works across multiple
>pages, so you don't have to duplicate code.

Including a CSS :)


-- 
===
Patrick Dunford, Christchurch, NZ - http://pdunford.godzone.net.nz/

   Now to him who is able to do immeasurably more than all we ask
or imagine, according to his power that is at work within us,   to
him be glory in the church and in Christ Jesus throughout all
generations, for ever and ever! Amen.
-- Ephesians 3:20-21
http://www.heartlight.org/cgi-shl/todaysverse.cgi?day=20010331
===
Created by Mail2Sig - http://pdunford.godzone.net.nz/software/mail2sig/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] CSS versus Includes

2001-03-31 Thread Michael Geier

this post is about apples and oranges...

CSS (Cascading Style Sheets) have nothing to do with includes.
They only have to do with formatting elements on a web page.
They can be written inside the document, or can referenced
externally via a  tag.

Includes can be anything from a configuration file, a block of
text, or a header or footer statement that works across multiple
pages, so you don't have to duplicate code.

If you meant something else, elaborate.

-Original Message-
From: Matt Braynard [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 30, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] CSS versus Includes


I have found that includes work just about as well. Any suggestions on going
with one or the other?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] CSS versus Includes

2001-03-30 Thread Matt Braynard

I have found that includes work just about as well. Any suggestions on going
with one or the other?



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]