Jump to content

some weird bug in html or js


Eugene

Recommended Posts

http://crazy4dollars.com

for some reason, when i view the the file from my hard drive, (no javascript) it looks ok, but when i view it online, i modified it obviously for the webpages purposes, and the input box gets resized from 35px height to 53px and the width goes from 166px to 184px, i dont know what is causing it, but i have a guess that its some javascript code that doesnt work with this input field or something.

 

Reply as soon as ppossible, ANY help will be greatly appreciated.

On a side note, i copied all the html as is, only difference is that there is javascript added to the online webpage. Thanks :)

Link to comment
https://forums.phpfreaks.com/topic/64002-some-weird-bug-in-html-or-js/
Share on other sites

Are you looking at the page in two different browsers? IE tends to do weird stuff with CSS, so if you're looking at it on your HD with FireFox, and then with IE on the actual website, that might explain your problem.

 

As far as resolving it, write a PHP script to determine the client's browser (like the following):

<?php
if(strstr(strtolower($_SERVER['HTTP_USER_AGENT']),"msie"))
  // Internet Explorer
elseif(strstr(strtolower($_SERVER['HTTP_USER_AGENT']),"firefox"))
  // FireFox
elseif(strstr(strtolower($_SERVER['HTTP_USER_AGENT']),"opera"))
  // Opera
else
  // Some other browser...
?>

 

And use a different CSS file in each case. Manually code each CSS file and test it in the corresponding browser. (Usually you can use the same CSS in FireFox and Opera.)

Archived

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

×
×
  • 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.