Jump to content


Photo

php


  • Please log in to reply
4 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 12 May 2006 - 11:24 PM

This is about php, I need to find an answer to this question, I am working with Xhtml/css, I am thinking of a work around for browser incompatibilities, is it a good idea to use PHP, to change the stylesheet based on the browser. Like I can have my default stylesheet for internet explorer, netscape, and firefox, have an alternate one for people that use opera browsers. Is this a good idea, or is it going to keep me from learning css well enough, I want to learn the best of both, I am not fully understanding the good, and bad uses for server side programming I am wondering if the use of php for this specific type of thing is a good idea or not, thanks.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 Carth

Carth
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts
  • LocationUK

Posted 12 May 2006 - 11:36 PM

Well if you want to control how it looks on each browser, then it's a good idea. I don't think it will impede your learning of CSS. You'll have to write more CSS surely? And controlling output based on user input (in this case, their choice of browser), is what server side programming does best.

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 12 May 2006 - 11:39 PM

So suppose I wanted to binge. I decided that I was going to start making a stylesheet, getting it good in every browser, and window size possible, hopefully liquid design. then for instance, I made an extra style sheet, one for every single browser that didn't work before, and every screen resolution I couldn't get right with the other browsers. And suppose I used php to put this all together, would I end up purging later.
To put it technically, will I end up running into a lot of issues later on down the road, when I start copying and pasting my homepage, and changing the actually content. Or will I have to do a whole lot of extra work, I am trying to find the best solution to both worlds, I have been putting a lot of thought into these kind of things that past few weeks, to strike a thin line between, Xhtml, css, php, and javascript, where i utilize all of them, for there best purposes.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 12 May 2006 - 11:56 PM

The real solution is to code so that your (x)html is 100% valid and your CSS is 100% valid. Avoid any CSS alternatives that are not supported with mainstream browsers or for which there are not rock-solid workarounds (typically IE is going to require the most work). Avoid coding anything that depends on a specific browser window size. Test everything using multiple browsers, and with different text sizes chosen by the browser is time well spent.

Creating a huge number of stylesheets is a losing proposition - you'll spend your life doing maintenance.

Using php to switch some elements of a stylesheet such as different header images for different pages is a sensible use of server-side coding. Breaking one large CSS file into components makes that a trivial exercise so that you only need to load the smaller page-specific CSS file instead of a whole new CSS file.

And - a helpful hint: try to use topic titles that at least give forum browsers a clue as to whether they want to read your topics. 'php' isn't very informative.
Legend has it that reading the manual never killed anyone.
My site

#5 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 13 May 2006 - 12:22 AM

ok thanks

so what browsers, do you suggest I test it under, I have netscape, internet explorer, opera, and firefox, but now I noticed when text sizes are changed, it still messes it up even in ie, when I change from medium, over to big font or something it messes the whole thing up, I thought accessibility and browser compatibility meant having it work in all browsers possible, with all text sizes excetera. What do you suggest.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users