Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Programming For Multiple Browsers., What do you think is the best way?
Shortyjtl00
post Jun 6 2007, 03:21 AM
Post #1


Newbie [Level 2]
**

Group: Members
Posts: 30
Joined: 4-June 07
Member No.: 44,177



Hey what do you think is the best way to code a site to appear correctly on multiple browsers? I've been thinking about useing Javascript or think of something in PHP.

Also would it be better for me to use a style sheet or the include or require function in PHP to increase speed for when I have to update my site?

I know how to do these things I'm just wondering wich way is the most effective and the fastest.

This post has been edited by Shortyjtl00: Jun 6 2007, 03:23 AM
Go to the top of the page
 
+Quote Post
jlhaslip
post Jun 6 2007, 04:16 AM
Post #2


A computer once beat me at chess, but it was no match for me at kick boxing.
Group Icon

Group: [MODERATOR]
Posts: 3,910
Joined: 24-July 05
From: In Trouble Again... still?
Member No.: 9,787
Spam Patrol



This Topic has several questions, so I'll break apart your posting to reply to the individual questions.

QUOTE
what do you think is the best way to code a site to appear correctly on multiple browsers?
Use div's instead of tables. Use the validator at W3c.org to validate your code. Avoid proprietary code which is not standard compliant. An exception to that last one is the IE Conditionals for creating IE specific CSS files. Set margins and padding to zero on the * html selector and add it on the element that needs it.

QUOTE
Also would it be better for me to use a style sheet or the include or require function in PHP to increase speed for when I have to update my site?


Both of these will make updates faster. And they can be used together. Php is used to write (x)html code which uses the CSS file for styling. javascript can be turned off in a client's Browser, so that may mess up your presentation or make the features on your site fail to work.
Go to the top of the page
 
+Quote Post
jamest
post Jun 6 2007, 05:17 AM
Post #3


Newbie
*

Group: Members
Posts: 4
Joined: 6-June 07
Member No.: 44,259



If you want to do it in multiple version of internet explorer use Multiple IEs Software
or you could use the firefox IE Plugin in firefox so you can test the site in two browsers.
Go to the top of the page
 
+Quote Post
AnkitGoswami
post Jun 6 2007, 10:38 AM
Post #4


Advanced Member
*******

Group: Members
Posts: 107
Joined: 7-April 07
From: India
Member No.: 41,207



My experience says always make a site with IE in mind and it will be displayed well in other browsers also. The other way around it almost always will get messy. I've done some extreme things to get my site towork correctly in IE. Once I even wrote separate css for different resolutions!
Go to the top of the page
 
+Quote Post
rvalkass
post Jun 6 2007, 11:15 AM
Post #5


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,061
Joined: 28-May 05
From: Hertfordshire, England
Member No.: 7,593
Spam Patrol



I always make my sites to work in Opera. Opera passed the acid test and is completely standards compliant, so if my site works in Opera then I know my code is right. Then I load it up in each other browser and see what it looks like. The only one to ever cause problems is IE, although gradually over time I have learned how to make sites work in IE and fix specific problems IE creates.

Setting every single option yourself, rather than leaving things as defaults in CSS is usually a good idea as it should make everything look the same. For example, jlhaslip's suggestion of setting borders, padding and margins of the HTML area to 0 means that browser defaults for padding the whole page etc. are overridden, so your page should look the same in each browser.

QUOTE
My experience says always make a site with IE in mind and it will be displayed well in other browsers also.

The problem with this is that most people make it work in IE and then leave it, without even looking at it in another browser. This is why many sites on the web don't work well in Opera or other browsers. And why I often turn away from a site - if they can't be bothered to test and correct their site, what they're selling or saying is normally not that good either. As long as you check your site works in every browser then you should be fine, no matter which way round you do it.

If statements in HTML are a good way if you have a really tricky problem to resolve, and the best approach would be to make separate CSS for each browser, or certain browsers (usually IE). Quirksmode has a great little guide on using them.
Go to the top of the page
 
+Quote Post
jamers
post Jun 12 2007, 01:57 AM
Post #6


Member [Level 1]
****

Group: Members
Posts: 71
Joined: 12-June 07
From: Ottawa
Member No.: 44,630



I think it is best to code for standards compliant browsers then as you go, check in IE as well so you know exactly what causes IE to act up and you can fix it on the fly. Much faster than trying to figure out bugs and hacks after everything is done. Sometimes one fix is dependant on another workaround etc. ..
I actually code for FF (since it uses the latest version of the Mozilla engine), then check in IE and NS. I used to just check in IE but then I noticed my pure CSS rollover/drop down menu wasn't working in NS even though it worked in FF and IE! Well, the gloves came off and after much pulling of hair, I started to wonder what the heck>?#$% then I saw the version of Mozilla was different even with the latest version of Netscape. Hmmmm Cheaters. Something to do with rendering of pseudo classes within elements that are fixed vs. absolute. I guess fixed elements "cover" pseudo class elements so my menu was looking like it dropped under my content area. Almost had a heart attack because I thought everything was cool and so I gave the URL to my client to look over the site. Lucky for me they all used IE anyway. At least I found that buggy element thing. man what a pain. I could not find anything about it on the net. there are so many bugs in IE I'm considering just boycott development for that piece of junk and tell all my clients "not guaranteed to work in IE browsers" but then I'd be out of work. Maybe additional charges to code for different browsers. Hmm I like that idea.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Best Multiple Users Scripting Tool?(1)
  2. Will Browsers Agree At Once On Standards?(1)
  3. How Do You Combine Multiple Mysql Databases Into One Database?(3)
  4. Multiple Forum Skins(6)
  5. Multiple Page Titles(1)


 



- Lo-Fi Version Time is now: 8th August 2008 - 12:11 AM