473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

site layout

is it possible to control css with php
Mar 13 '08 #1
12 1331
ap************@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?

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

Mar 14 '08 #2
..oO(Jerry Stuckle)
>ap************@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
Mar 14 '08 #3
On Fri, 14 Mar 2008 13:04:24 +0100, Michael Fesser <ne*****@gmx.dewrote:
.oO(Jerry Stuckle)
>ap************@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.
Indeed. Do provide the correct content-type and some caching headers :).
--
Rik Wasmus
Mar 14 '08 #4
Michael Fesser wrote:
.oO(Jerry Stuckle)
>ap************@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.

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

Mar 14 '08 #5
Jerry Stuckle wrote:
Michael Fesser wrote:
>.oO(Jerry Stuckle)
>>ap************@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?

Mar 14 '08 #6
The Natural Philosopher wrote:
Jerry Stuckle wrote:
>Michael Fesser wrote:
>>.oO(Jerry Stuckle)

ap************@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.
js*******@attglobal.net
==================

Mar 14 '08 #7
Greetings, Jerry Stuckle.
In reply to Your message dated Friday, March 14, 2008, 05:24:43,
>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.
--
Sincerely Yours, AnrDaemon <an*******@freemail.ru>

Apr 2 '08 #8
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Friday, March 14, 2008, 05:24:43,
>>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.

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.
js*******@attglobal.net
==================

Apr 3 '08 #9
Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 08:44:00,
>>>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.
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.
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 <an*******@freemail.ru>

Apr 3 '08 #10
AnrDaemon wrote:
Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 08:44:00,
>>>>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.
>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.
>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.
js*******@attglobal.net
==================

Apr 3 '08 #11
Greetings, Jerry Stuckle.
In reply to Your message dated Thursday, April 3, 2008, 16:08:49,
>>>>>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.
>>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.
>>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.
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 <an*******@freemail.ru>

Apr 7 '08 #12
Greetings, Guillaume.
In reply to Your message dated Tuesday, April 8, 2008, 19:28:26,
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 <an*******@freemail.ru>

Apr 10 '08 #13

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

Similar topics

24
by: delerious | last post by:
Hi, I am designing a web site that will that showcase a bunch of vacation pictures. It will have a banner and a navigation menu (consisting of 13 rectangular images that can be clicked). I am...
2
by: Anthony Williams | last post by:
Hi, I just updated the Ashwater website at http://www.ashwaterparish.org.uk to use CSS rather than frames/tables for layout. It works fine in NS7.1, Mozilla Firebird 0.6, IE6, Opera 5 and...
25
by: John Morgan | last post by:
Though I have designed and implemented a number of large reasonably well received web sites I do not consider myself a graphics designer I am now for the first time going to work with a ...
0
by: Jeff Dockman | last post by:
Background: We needed the ability to create a templated web site that may change in layout from installation to installation. To accomplish this, we created a base Page class that all pages in...
5
by: bclegg | last post by:
Hi, I am a web newbie writing my first intranet web site using Webforms. I remember when playing with Interdev it was possible to get a canned style for your site, 'raygun' comes to mind. Is...
2
by: Jason Hanks | last post by:
Hi, are there any examples that demonstrate how to build an ASP.NET page with consistent parts of the layout, such as page headers, footers, and navigation links (such as going into each section...
26
by: JB | last post by:
Hi All, This is my first go at a pure CSS web site and I'd like your comments and suggestions please. The URL is http://www.waukeshapumps.com/ Comments on CSS, design and content very...
2
by: ODAN | last post by:
Can anyone recommend a software/package application that I can use on our corporate Web site? We like to use our Web template and layout and with no advertisement on our site. And something that...
71
by: Murray R. Van Luyn | last post by:
Hi, Since I have made changes to my website it's been a complete flop. According to the logs, as soon as visitors have downloaded the index page they are off. I can't figure out why? ...
7
by: flica33 | last post by:
This site is working perfectly in IE and Firefox, but seems to lose most formatting when viewed in Safari. Font styles are appearing, but the layout is pretty much non-existent. There are a few other...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.