Using PHP for "Fluid" Design (Using View Resolution)
I need a few opinions on how to use PHP to create fully scalable websites. For example using viewfinder resolution and resizing images using dynamic css styles ..... In my mind this just adds complexity and shouldn't be done, it should be fixed or fluid, using strictly css and server-side languages ββto create layouts in based on device size.
I need some input and maybe some philosophy as to why using this approach is not being used at all.
a source to share
Manipulating a web page this way is a domain of CSS driven by Javascript (or a library like JQuery, see the CSS Docs ), you shouldn't waste your CPU cycles when client side implementations are much more user-responsive and allow you to all the flexibility you need. Changing the font size, etc. Can be done almost instantly in the browser without having to request another page from your (remote) server, resulting in a slower user experience.
a source to share
Indeed, really NOT
As Andy says, this is the CSS domain. Trying to adapt your design with PHP will make your code irreplaceable. You must learn how to use CSS effectively to avoid this kind of hack.
The only reason you could use PHP for browser detection and content adaptation is for a mobile browser.
Given the number of User Agent tokens in existence, it is almost impossible to make scalable websites.
a source to share