• 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

    • Win11Debloat 06.11.2026 by Razvan Serea Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. All changes made by Win11Debloat can be easily reversed, and most removed apps can be restored via the Microsoft Store. A full guide on how to undo the changes is available here. Win11Debloat features: Below is an overview of the key features and functionality offered by Win11Debloat. Please refer to the wiki for more information about the default settings preset. Remove a wide variety of preinstalled apps. Click here for more info. Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads. Disable tips, tricks, suggestions & ads across Windows. Disable Windows location services & app location access. Disable Find My Device location tracking. Disable 'Windows Spotlight' and tips & tricks on the lock screen. Disable 'Windows Spotlight' desktop background option. Disable ads, suggestions and the MSN news feed in Microsoft Edge. Hide Microsoft 365 ads on the Settings 'Home' page, or hide the 'Home' page entirely. Disable & remove Microsoft Copilot. Disable Windows Recall. Disable Click to Do, AI text & image analysis tool. Prevent AI service (WSAIFabricSvc) from starting automatically. Disable AI Features in Edge. Disable AI Features in Paint. Disable AI Features in Notepad. Disable the Drag Tray for sharing & moving files. Restore the old Windows 10 style context menu. Turn off Enhance Pointer Precision, also known as mouse acceleration. Disable the Sticky Keys keyboard shortcut. Disable Storage Sense automatic disk cleanup. Disable fast start-up to ensure a full shutdown. ...and more. Once you’ve downloaded the Win11Debloat file (Get.ps1), just follow these quick steps: Locate the Get.ps1 script file. Right-click the file and select Run with PowerShell from the context menu. If prompted by User Account Control (UAC), select Yes to grant the script the necessary administrative permissions. Win11Debloat 06.11.2026 fixes: Fix lock screen spotlight option being disabled when disabling the start recommended section by @Raphire in #619 Fix log message formatting by @Raphire Note The -RemoveCommApps and -RemoveW11Outlook command-line parameters for uninstalling a few specific apps have been removed with this release. If you previously relied on these parameters, please see this wiki page for alternative methods of removing these apps. Download: Win11Debloat 06.11.2026 | Open Source View: Win11Debloat Home Page | Screenshots 1| 2 Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Yes for me, I installed 'old calculator' (Windows 7 calculator) in its place since it is more useful to me. I think paint is the only one I left installed
    • eh I'll wait for the June 2026 MVS ISO downloads which should be coming out next Tuesday June 16 and possibly contain build 8655 instead of 8653
  • Recent Achievements

    • Rookie
      restore went up a rank
      Rookie
    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      +Edouard
      162
    3. 3
      PsYcHoKiLLa
      155
    4. 4
      ATLien_0
      82
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!