Jump to content

Appearance in different browsers


johnseito

Recommended Posts

Hello everyone,

 

 

I created a web form with html and some php using mainly Mozilla Firefox for it's appearance.  It looks nice as how I wanted it in FireFox, but when I open it in internet explorer, the appearance of the form looks totally different.  It's appearance is out of wack.

 

 

Does anyone know why and how I can fix this for all browser?

 

 

 

Thanks,

Link to comment
Share on other sites

And before you worry about how your page looks in different browsers, make sure the HTML and CSS are valid -

 

HTML validator - http://validator.w3.org/

CSS validator - http://jigsaw.w3.org/css-validator/

 

Putting in effort to make a page that contains invalid HTML/CSS look the way you want will be wasted because its' appearance will likely change once the HTML/CSS is corrected to make it valid.

Link to comment
Share on other sites

its not really a PHP issue... rather, it is caused either from JavaScript (DOM) and/or CSS and/or HTML itself. why? because different browsers behaves differently. firstly, try fixin' it... and if issues arrives because they are really caused by different browsers, then add your tweaks. :)

 

when creating web apps, test it with different platforms (Windows XP, Windows Vista, Linux, etc) and with different browsers (MSIE, Mozilla Firefox, Mac).

 

just an example:

 

i test my code over different browsers: MSIE6, MSIE7, MozFirefox 2.xx, MozFirefox 3.0, Safari, etc. (together with the platforms).

 

cheers,

 

Jay

Link to comment
Share on other sites

Each browser has its own form elements. You can't control how they look, besides setting basic attributes like size and background color with CSS.

 

 

Wow you obviously have no clue how a web browser works.

 

 

Web browsers are basically compilers for html/css/js and any other client side scripting they can handle.  They take what is in the tags and so forth and attempt to render out visual and computer solutions to them.

When blanks are left out such as in styling the browser has no choice but to use what it belives to be the "right" rendering resulting in minor alterations between browsers.

To prevent these alternations between browsers standards such as w3, acid2 etc. have been developed that web browser developers should use to help maintain consitent presentation of data through web browsers.

 

You can absolutely control the visuals of a site 100% if you so want, however most of the time a blanket w3 transitional compliant layout + solid css will give you a consitent enough look to be acceptable in standard browsers (Mozilla, IE, Safari, Netscape)

Link to comment
Share on other sites

its a pity, i know, from our side that different browser behaves differently, bu you can do nothing in php to solve that. I can tell you php codes will behave same in each browser, the problems will be mostly with HTML ,CSS and in some extent with JAVASCRIPTS (all of which are client side language). Thats why what I do, I open FF and IE while designing and make sure that both browser looks same. It is some kind of boring (like Trial and Error method), but it is possible in most case (if not all) to give same look in all browser.

Link to comment
Share on other sites

its a pity, i know, from our side that different browser behaves differently, bu you can do nothing in php to solve that.

Wrong again!

 

PHP can detect USER_AGENT and load styles or layouts specific to a browser to force a proper rendering.

Mod_Rewrite can achieve a similar process use the ReWriteEngine and the same HTTP variables

Link to comment
Share on other sites

yep... you can do something before it lands... get_browser(), and whatever tweaks.

 

but not 100%. this specially when things gets a bit tricky and a lot of scripting at the client. This is because browsers do not have the same engine that parse JavaScript. one script that run perfectly on one browser does not mean it would always run perfectly to other browser.

 

from our side that different browser behaves differently
true

 

but you can do nothing in php to solve that
false

 

there are a few things PHP can't get too
true
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.