johnseito Posted June 20, 2008 Share Posted June 20, 2008 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, Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 20, 2008 Share Posted June 20, 2008 can we see the code?? Quote Link to comment Share on other sites More sharing options...
whizard Posted June 20, 2008 Share Posted June 20, 2008 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. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 Has nothing to do with PHP. It has to do with browser differences (IE is "special"...a.k.a retarded) in CSS handling. Post some of the CSS and show screenshots of the differences. Quote Link to comment Share on other sites More sharing options...
rhodesa Posted June 20, 2008 Share Posted June 20, 2008 and as DarkWater stated, can a moderator move this to HTML/CSS Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted June 20, 2008 Share Posted June 20, 2008 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. Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 20, 2008 Share Posted June 20, 2008 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 Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 20, 2008 Share Posted June 20, 2008 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) Quote Link to comment Share on other sites More sharing options...
abdfahim Posted June 20, 2008 Share Posted June 20, 2008 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. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 20, 2008 Share Posted June 20, 2008 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 Quote Link to comment Share on other sites More sharing options...
abdfahim Posted June 20, 2008 Share Posted June 20, 2008 I didn't know that. Thanks. I will check the function. I thought this kind of activities is possible by javascript. Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 20, 2008 Share Posted June 20, 2008 there are a few things PHP can't get too, to get through this some people will have a page load a secondary page to use js in the background through ajax to give php the info it needs. Quote Link to comment Share on other sites More sharing options...
bluejay002 Posted June 20, 2008 Share Posted June 20, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.