Connecting Tech Pros Worldwide Help | Site Map

site layout

 
LinkBack Thread Tools Search this Thread
  #1  
Old March 13th, 2008, 11:55 PM
appplehead2000@yahoo.co.uk
Guest
 
Posts: n/a
Default site layout

is it possible to control css with php

  #2  
Old March 14th, 2008, 12:25 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: site layout

appplehead2000@yahoo.co.uk wrote:
Quote:
is it possible to control css with php
>
Sure. CSS can be generated with PHP, just like HTML can.

The main question being - why?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #3  
Old March 14th, 2008, 12:05 PM
Michael Fesser
Guest
 
Posts: n/a
Default Re: site layout

..oO(Jerry Stuckle)
Quote:
>appplehead2000@yahoo.co.uk wrote:
Quote:
>is it possible to control css with php
>>
>
>Sure. CSS can be generated with PHP, just like HTML can.
>
>The main question being - why?
I do it for one reason - CSS doesn't support variables. With PHP I can
define some variables or constants at the beginning and then simply use
them later. Makes it very easy to play with different values.

And with some proper HTTP headers at the beginning the PHP-CSS is still
cacheable in browsers.

Micha
  #4  
Old March 14th, 2008, 12:15 PM
Rik Wasmus
Guest
 
Posts: n/a
Default Re: site layout

On Fri, 14 Mar 2008 13:04:24 +0100, Michael Fesser <netizen@gmx.dewrote:
Quote:
.oO(Jerry Stuckle)
Quote:
>appplehead2000@yahoo.co.uk wrote:
Quote:
>>is it possible to control css with php
>>>
>>
>Sure. CSS can be generated with PHP, just like HTML can.
>>
>The main question being - why?
>
I do it for one reason - CSS doesn't support variables. With PHP I can
define some variables or constants at the beginning and then simply use
them later. Makes it very easy to play with different values.
>
And with some proper HTTP headers at the beginning the PHP-CSS is still
cacheable in browsers.
Indeed. Do provide the correct content-type and some caching headers :).
--
Rik Wasmus
  #5  
Old March 14th, 2008, 12:25 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: site layout

Michael Fesser wrote:
Quote:
.oO(Jerry Stuckle)
>
Quote:
>appplehead2000@yahoo.co.uk wrote:
Quote:
>>is it possible to control css with php
>>>
>Sure. CSS can be generated with PHP, just like HTML can.
>>
>The main question being - why?
>
I do it for one reason - CSS doesn't support variables. With PHP I can
define some variables or constants at the beginning and then simply use
them later. Makes it very easy to play with different values.
>
And with some proper HTTP headers at the beginning the PHP-CSS is still
cacheable in browsers.
>
Micha
>
Hi, Micha,

Yes, that I can understand, and I've done similar in the past. But once
I get something I like, I typically just convert it to CSS and let it go
at that.

But that also isn't "controlling" CSS like I think the op wants to do.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #6  
Old March 14th, 2008, 01:15 PM
The Natural Philosopher
Guest
 
Posts: n/a
Default Re: site layout

Jerry Stuckle wrote:
Quote:
Michael Fesser wrote:
Quote:
>.oO(Jerry Stuckle)
>>
Quote:
>>appplehead2000@yahoo.co.uk wrote:
>>>is it possible to control css with php
>>>>
>>Sure. CSS can be generated with PHP, just like HTML can.
>>>
>>The main question being - why?
>>
>I do it for one reason - CSS doesn't support variables. With PHP I can
>define some variables or constants at the beginning and then simply use
>them later. Makes it very easy to play with different values.
>>
>And with some proper HTTP headers at the beginning the PHP-CSS is still
>cacheable in browsers.
>>
>Micha
>>
>
Hi, Micha,
>
Yes, that I can understand, and I've done similar in the past. But once
I get something I like, I typically just convert it to CSS and let it go
at that.
>
But that also isn't "controlling" CSS like I think the op wants to do.
>
Does he mean - say - linking to a stylesheet that is in fact a php script?

  #7  
Old March 14th, 2008, 02:35 PM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: site layout

The Natural Philosopher wrote:
Quote:
Jerry Stuckle wrote:
Quote:
>Michael Fesser wrote:
Quote:
>>.oO(Jerry Stuckle)
>>>
>>>appplehead2000@yahoo.co.uk wrote:
>>>>is it possible to control css with php
>>>>>
>>>Sure. CSS can be generated with PHP, just like HTML can.
>>>>
>>>The main question being - why?
>>>
>>I do it for one reason - CSS doesn't support variables. With PHP I can
>>define some variables or constants at the beginning and then simply use
>>them later. Makes it very easy to play with different values.
>>>
>>And with some proper HTTP headers at the beginning the PHP-CSS is still
>>cacheable in browsers.
>>>
>>Micha
>>>
>>
>Hi, Micha,
>>
>Yes, that I can understand, and I've done similar in the past. But
>once I get something I like, I typically just convert it to CSS and
>let it go at that.
>>
>But that also isn't "controlling" CSS like I think the op wants to do.
>>
Does he mean - say - linking to a stylesheet that is in fact a php script?
>
>
Yes.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #8  
Old April 2nd, 2008, 10:35 PM
AnrDaemon
Guest
 
Posts: n/a
Default Re: site layout

Greetings, Jerry Stuckle.
In reply to Your message dated Friday, March 14, 2008, 05:24:43,
Quote:
Quote:
>is it possible to control css with php
Quote:
Sure. CSS can be generated with PHP, just like HTML can.
Quote:
The main question being - why?
In example, You have 3 browsers (Regular desktop, Mobile client (GPRS-WAP and
the like), specialized in-application browser) what should render the same
page without loosing of readability. Yes, You can send different CSS for every
single one, but maintaining 3 different files isn't easy, if they are so
close and You need to make changes in them all if something goes to change.
Much simpler to have PHP script that acting to serve CSS template and adapt it
to every browser. Even then, with server-side caching it's very fast process,
and with proper headers it will be cached on the client side too.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

  #9  
Old April 3rd, 2008, 03:45 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: site layout

AnrDaemon wrote:
Quote:
Greetings, Jerry Stuckle.
In reply to Your message dated Friday, March 14, 2008, 05:24:43,
>
Quote:
Quote:
>>is it possible to control css with php
>
Quote:
>Sure. CSS can be generated with PHP, just like HTML can.
>
Quote:
>The main question being - why?
>
In example, You have 3 browsers (Regular desktop, Mobile client (GPRS-WAP and
the like), specialized in-application browser) what should render the same
page without loosing of readability. Yes, You can send different CSS for every
single one, but maintaining 3 different files isn't easy, if they are so
close and You need to make changes in them all if something goes to change.
Much simpler to have PHP script that acting to serve CSS template and adapt it
to every browser. Even then, with server-side caching it's very fast process,
and with proper headers it will be cached on the client side too.
>
>
And even simpler is to have valid CSS which works in all browsers. Then
you don't need hacks like you are promoting.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #10  
Old April 3rd, 2008, 09:45 AM
AnrDaemon
Guest
 
Posts: n/a
Default Re: site layout

Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 08:44:00,
Quote:
Quote:
Quote:
>>>is it possible to control css with php
>>
Quote:
>>Sure. CSS can be generated with PHP, just like HTML can.
>>
Quote:
>>The main question being - why?
>>
>In example, You have 3 browsers (Regular desktop, Mobile client (GPRS-WAP and
>the like), specialized in-application browser) what should render the same
>page without loosing of readability. Yes, You can send different CSS for every
>single one, but maintaining 3 different files isn't easy, if they are so
>close and You need to make changes in them all if something goes to change.
>Much simpler to have PHP script that acting to serve CSS template and adapt it
>to every browser. Even then, with server-side caching it's very fast process,
>and with proper headers it will be cached on the client side too.
Quote:
And even simpler is to have valid CSS which works in all browsers.
Yes, create a page "Hello, World!" and be happy with it!
Sorry but I need real pages, not dummy examples.
Quote:
Then you don't need hacks like you are promoting.
Your words just showing a complete lacks of knowledge in specified situation.
Figure out Yourself, why...


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

  #11  
Old April 3rd, 2008, 11:15 AM
Jerry Stuckle
Guest
 
Posts: n/a
Default Re: site layout

AnrDaemon wrote:
Quote:
Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 08:44:00,
>
Quote:
Quote:
>>>>is it possible to control css with php
>>>Sure. CSS can be generated with PHP, just like HTML can.
>>>The main question being - why?
>>In example, You have 3 browsers (Regular desktop, Mobile client (GPRS-WAP and
>>the like), specialized in-application browser) what should render the same
>>page without loosing of readability. Yes, You can send different CSS for every
>>single one, but maintaining 3 different files isn't easy, if they are so
>>close and You need to make changes in them all if something goes to change.
>>Much simpler to have PHP script that acting to serve CSS template and adapt it
>>to every browser. Even then, with server-side caching it's very fast process,
>>and with proper headers it will be cached on the client side too.
>
Quote:
>And even simpler is to have valid CSS which works in all browsers.
>
Yes, create a page "Hello, World!" and be happy with it!
Sorry but I need real pages, not dummy examples.
>
Quote:
>Then you don't need hacks like you are promoting.
>
Your words just showing a complete lacks of knowledge in specified situation.
Figure out Yourself, why...
>
>
Not at all. A lot of other webmasters I know also create very
complicated pages all the time which work in all browsers. But it
doesn't surprise me that you are incapable of doing it without your hacks.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  #12  
Old April 7th, 2008, 02:55 AM
AnrDaemon
Guest
 
Posts: n/a
Default Re: site layout

Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 16:08:49,
Quote:
Quote:
Quote:
>>>>>is it possible to control css with php
>>>>Sure. CSS can be generated with PHP, just like HTML can.
>>>>The main question being - why?
>>>In example, You have 3 browsers (Regular desktop, Mobile client (GPRS-WAP and
>>>the like), specialized in-application browser) what should render the same
>>>page without loosing of readability. Yes, You can send different CSS for every
>>>single one, but maintaining 3 different files isn't easy, if they are so
>>>close and You need to make changes in them all if something goes to change.
>>>Much simpler to have PHP script that acting to serve CSS template and adapt it
>>>to every browser. Even then, with server-side caching it's very fast process,
>>>and with proper headers it will be cached on the client side too.
>>
Quote:
>>And even simpler is to have valid CSS which works in all browsers.
>>
>Yes, create a page "Hello, World!" and be happy with it!
>Sorry but I need real pages, not dummy examples.
>>
Quote:
>>Then you don't need hacks like you are promoting.
>>
>Your words just showing a complete lacks of knowledge in specified situation.
>Figure out Yourself, why...
Quote:
Not at all. A lot of other webmasters I know also create very
complicated pages all the time which work in all browsers. But it
doesn't surprise me that you are incapable of doing it without your hacks.
It is good only if browser support that complicated CSS... Sorry Jerry, but
You're lost in Your ideal world. Sad thing is that, reality different from
Your expectations.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

  #13  
Old April 10th, 2008, 01:15 AM
AnrDaemon
Guest
 
Posts: n/a
Default [OT] Re: site layout

Greetings, Guillaume.
In reply to Your message dated Tuesday, April 8, 2008, 19:28:26,
Quote:
Nice fight. Popcorn anyone ?
Just a note: I've been speaking about 3 completely different browsers. Not
just 3 major desktop browsers that can render 99% of CSS2... but different 99%
each.
I understand the rest of Your post as I were able to write it myself, if
things were the same as You have mentioned. I'm competent with CSS2 and I do
know enough to make it looks almost equally in any of the 3 major desktop
browsers, but not me nor You can make it looks the same in limited built-in
browser or in cell-phone browser (even if it is Opera). Altough both of the
last have some knowledge in CSS, they limiting support in both tags and CSS
directives by different reasons.
I made this post just to reenter the rules under what I have used such
technique (PHP-generated CSS), not to produce more flame.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.