• 0

Dynamic PHP-Driven CSS Stylesheets


Question

Can you imagine running a website with hundreds of pages off pure, static, html? Without a single bit of server-side code? No PHP, Perl, Ruby, or even SHTML? What about a site with hundreds of thousands of pages? or millions? Of course not. So why do you put up with static CSS files then?!

This article takes a look at the unused potential of dynamic CSS sheets and how they help.

Case Study: Shaun Inman's site with 33,306 CSS Sheets in use.

Other benefits:

Completely overhauled user experience

Faster sites

CSS-Contained browser detection

That's just some of the stuff you can do with something like that.

Article: Dynamic (PHP-Driven) CSS Stylesheets

Source: NeoSmart Technologies

[digg]

Edited by Computer Guru
Link to comment
https://www.neowin.net/forum/topic/507381-dynamic-php-driven-css-stylesheets/
Share on other sites

17 answers to this question

Recommended Posts

  • 0

^ Did you RTFA?

Because that's the point of the article - you no longer need to do that. With dynamic CSS it does it automatically for you.

it's nice for having different themes for your site. you can set a cookie and PHP will handle the rest based on the cookie

Thats what i meant :p

didnt think about the cookie thing though :shiftyninja:

  • 0
' date='Oct 29 2006, 01:15' post='587996470']

Now your techniques are a bit more covered plus it might avoid problems with older problems.

:blink: Come again?

....

Also, if you use the header() line mentioned in the article there is no need for css extension - it's just another MIME - esp. since only Apache has .htaccess.

  • 0

Yes, you can mask it. But if you do, that's your problem. Blocking JavaScript is one thing - there's a legitimate reason to do so. But blocking your UA-Ref is just plain stupid. It exists for a reason, you're being a paranoid doesn't make coders'/designers' jobs any easier.

There are great advantages to PHP-CSS, they may be "common sense" but to date no one is using them... eh? :shifty:

  • 0

Yes, you can mask it. But if you do, that's your problem. Blocking JavaScript is one thing - there's a legitimate reason to do so. But blocking your UA-Ref is just plain stupid. It exists for a reason, you're being a paranoid doesn't make coders'/designers' jobs any easier.

There are great advantages to PHP-CSS, they may be "common sense" but to date no one is using them... eh? :shifty:

maybe because 99% of the time there's ONE stylesheet associated with the entire site? That's the point of CSS isnt it? to centralize all styling. And as the web dev you're not supposed to depend on sniffing useragents to make your site work. It should be able to work regardless of who is claiming to be who but is actually who.

  • 0

^ "should be able to" and "are actually capable of working in today's highly mixed-up online world" are rather different, doncha think ;)

Anyway, like the article states, UA-ref is just one of the many things.

Imagine a neowin where you can click on the header, and change the color, then open your control panel and change the display fonts, or a million other things?

That would be near impossible without dynamic css.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • eSound Music 3.0.0 by Razvan Serea eSound Music is a free music streaming app that gives you access to over 150 million tracks from all genres. It allows you to search and listen to your favorite songs, create personalized playlists, and explore trending music. With an intuitive interface and smart search, discovering new artists and hits is fast and easy. You can even stream music in the background while using other apps. One of eSound’s standout features is its offline mode, letting you download and listen without internet access. eSound is widely compatible, working seamlessly across Windows, macOS, Linux, iPhone, iPad, Android, HarmonyOS, Amazon Fire devices, CarPlay, Android Auto, and more. eSound Music key features: Over 150 million tracks available Smart search for songs, artists, albums, and playlists Personalized song recommendations Continuous playback with auto-generated playlists Offline mode with song and playlist downloads Daily-updated trending charts and top songs Sleep timer to auto-stop playback High-quality audio support Customizable playlists and favorites Support for Apple CarPlay and Android Auto Works on Windows, macOS, Linux, iOS, Android, HarmonyOS, Amazon Fire, and more Cross-device sync via account login Background playback while using other apps Download: eSound Music 64-bit | Portable | ~160.0 MB (Free, paid upgrade available) Download: ARM64 | 116.0 MB Links: eSound Music Website | Screenshot | Web Player | Other OSes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • All these CEOs got the biggest boners thinking about firing employees for AI. Turned out it was just a wet dream.
    • And the fact that the majority of people from Poland are white European Christians while the people you are complaining about in post after post are not is just a coincidence... Every sentence in your post I am replying to is racist nonsense. None of it is actually based on any facts whatsoever. All immigrants are seeking a better life too. It's literally the only reason they would risk everything and leave their homes, families, and homeland. They are working and contributing to the economy too, as you even admit. They get the same benefits your partner did AND that YOU are eligible for as well. That is one of the key things of the EU and a mark of a civilization. That is the definition of a society where everyone is given a chance, treated equally and fairly, and is judged by the content of their character, not their different skin color or which version of ignorant superstitious nonsense their parents lied about as children. Racists around the world said the same things about the Irish and Jews and Poles (like your partner) and...every other immigrant movement over the centuries. What's your family's heritage, by the way? Were your ancestors lied about with racist fearmongering crapola by self-entitled locals the same way as you are now? If someone like that said the same things about all people from Poland, like your partner, would they be right? Or would you want them to judge your partner based on who they actually were, not where they just happened to come from?
    • Again, this is an irrelevant attempt to attack the messenger. The truth does not require any justification.
  • Recent Achievements

    • Conversation Starter
      jessse3334 earned a badge
      Conversation Starter
    • Reacting Well
      JuvenileDelinquent earned a badge
      Reacting Well
    • One Month Later
      Excellence2025 earned a badge
      One Month Later
    • Week One Done
      Excellence2025 earned a badge
      Week One Done
    • Week One Done
      flexorcist earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      +Edouard
      196
    3. 3
      PsYcHoKiLLa
      153
    4. 4
      Steven P.
      72
    5. 5
      FloatingFatMan
      65
  • Tell a friend

    Love Neowin? Tell a friend!