Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

idea(wanting advice), all php related

Recommended Posts

I am thinking about permanently starting to use .php for css files, and just send the header as css.  The reason I think it'll work is because I can't keep doing this.  I want to get better at design, but because of css I am afraid to, to tell you the truth(on the css front), if it hadn't of been for wildteen helping me sometimees like he did, I don't know what I would do, there were a few times, he created entire css layouts for me, for different projects I was working on, and other people who helped me fix issues.  There are atleast 3 different occassions where wildteen created an entire layout from scratch for me, off an idea I was trying to get together.  THose are times when I saved day's and day's worth of work.  I am wanting to do this, because I think using like
if (browser is firefox)
do this
whatever
well that's not the code but you get the point, testing to see, and using different margins, based on the browser type.  With this method, I could use 1 stylesheet, and concentrate more on my design, than worrying about css, and it should still validate properly.  I just have to make it output proper css??  Any advice on this, because I could work up a whole design, and he could say, well it doesn't look right in {insert some foriegn browser name here} or it looks like shit in {insert obnoxious screen resolution here} and then instead of worrying about it, I can use php to detect the resolution(I know there's a wway with either php or javascript) then just output some different styles for that resolution to fix the problem.  Easy to mantain all in one stylesheet(just comment it well).
Any advice, this might really help me from now on, or can I not validate a css file if it's .php, I think they go by the headers the page gives off though, not the extension.

Share this post


Link to post
Share on other sites
Personally, I think you're heading in completely the wrong direction here.  Writing an enormous conditional CSS file to cope with different resolutions, different browsers, etc. is a sign that you can't create good CSS and never will.  As an aside, you can't user server-side code to detect a client-side browser property like screen resolution; and screen resolution isn't as important as window size.  Sounds to me that it will turn into a maintenance headache as you discover more and more browser-specific hacks are needed in [b]your[/b] version of CSS code, when doing it right initially would have avoided the need for a work-around.

I haven't seen anything yet that you've attempted that couldn't be done in a single CSS file without what amounts to multiple CSS files and that would work in all browsers at all resolutions.

Share this post


Link to post
Share on other sites
I know, but all I see all over the internet.  Every where, in every corner the same thing
with php, it's hard to learn, but once you learn the basics you have mastered hte basics, then you look at a classified ad system, it's aggravating and hard, once you build 1, it get's easier after 2-3 which ended up being mostly what I have build so far, the programming behind hte systems become very, very easy.  THen you get into cms, and other stuff, pricing engines for loan companies, and various other types of systems, engines, and everything and you look at one, and say what the hell, I could never  do that "Especially shopping cart systems", then it comes to the point where you eventually get yourself to build one, after a few times it get's easier, until it's second nature(with the exceptions to a forum system, or message board), then it eventually comes to the subject of xhtml.
You learn it you know it, there are no cross browser issues with xhtml, a complete tables site doesn't have cross browser issues if done right.  So xhtml itself is easy to learn, easy to master, and easy to figure out.  Then you have other server side languages, I even picked up some asp and jsp(not to program, but general knowledge, how to validate some forms, ex cetera(also cold fusion.). After learning php, those are pretty easy to understand, and get the hang of.  Then I look at javascript, heavily not cross browser compatible, but it's been around so long, I never had issues with javascript working in one browser and not the other, I just pick objects, methods, and functions that are good in all the browsers I need, and only stick to them, unless I am making something for new browsers only, or doing ajax, but even ajax isn't that hard to make compatible with browsers once you get the thing started.  THen design, you do get better with design, you eventaully get an eye for good color combinations, good layouts with good themes, graphic design I have caught on quite a bit about photoshop(as the software), and image manipulation, I still might be a novice at it, but I am definitely getting better.

Now it's back to css, it comes to the point where no matter how hard I try, actually at my current level, I can actually sit down in photoshop, and actually create a good looking layout.  It's getting easier for me to unlock my creativity.  Then it comes to coding, xhtml/css is easy.  I can code a website, off a image, with no problem.  Until it get's to the point where I have it working in 1 browser, then no matter what, it is murder to get it right in all 3, sometimes it doesn't seem possible, something that seems to take me 30 minutes ends up taking me 3 days.  I would have time to program half a classified ad system in that time, I need help, I want to ask, is there anyone that can help me, I went over all tutorials, I learnt css just like I learnt php, and I barely ever have problems with php anymore, or mysql, except now me trying to learn regular expressions.  Is there something I can do, I admire wildteen, and others, they site down with a design I fight with for hours, and code something in 5 minutes using css.  even though I know all the css tags, and mostly how they work, I never get the layouts right on the web, it never works out, and it makes me sit here nad wonder, why not tables.  WHy not jsut go the easy way out, no-one would ever know but other developers, and mainly myself, I just can't do it, I feel tables are evil(used for layouts), they are the epitome of satan, I have to learn again.  I think I have to go back to scratch, to very css basics, and relearn all over again, but why,  what do I learn, I could go through w3schools, i look at everything they have there, and I say, I know that, I have those tags memorized.  A link related tags, I know all of them, how to do anything with link colors, working with background colors, colors.  I just don't know how to make it work in all browsers(That matter), and all screen resolutions, even with me not being able to use internet explorer 7 yet, I never know how they look in there, it's aggravating to work 3-4 days on something, to hear a client say the WHOLE thing is off in resolution that is high, or another browser like safari, or something there has to be a point, that this doesn't happen anymore, a point where I don't have to deal with that???

Share this post


Link to post
Share on other sites
Sigh. It's not the first time that you've expressed the point of view that it takes you days and days to do something that others seem to be able to do in minutes.  And this isn't the first time I've given you the same answer - outsource it!  Pay someone $50 to create a cross-browser compliant CSS layout from your screen images and spend the three days you save in working at something you can do and that will make money for you.  There are plenty of outsourcing sites where you can get competitive bids and even find highly qualified people who are willing to work for relatively low payments.

Think about it like this. Suppose you could get paid $100/hour to program but your car needed an oil change. What makes most sense - pay someone $20 to change your oil or spend three hours changing your oil and congratulating yourself on saving $20 when you could have earned $300 in the same time.  It's called 'opportunity cost': do what you can do effectively, outsource what you can't.

And one final word of advice - again, not for the first time. Get your clients to commit and agree to their needs before you start the work and before you agree a price. If you've agreed a site will work with browsers A, B, C, and D and then it doesn't work in some browser that one in a million people use, no problem - remind your client that's outside of the pre-agreed scope of work, and offer to give them a quotation for the additional work.

If you're going to stay in business, you need to act in a business-like manner.

Share this post


Link to post
Share on other sites
That's what I need, that kind of advice, can you give me more.  More advice in general like you just did, I am listening to all of it.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.