vinnier Posted March 15, 2010 Share Posted March 15, 2010 Hi, I am having a problem with my website http://chat.hlippo.com/ when I access it using FF it all looks fine, same with Safari but with Opera, Chrome and IE8 the website is messed up/ Attached 2 files to show what I mean. Please help me fix it. Cheers. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/ Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 Step one is to fix the 926 errors in your HTML. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026118 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Thank you, but these errors are keywords related can't see there anything that would mess up the layout of the from in IE etc. I will fix the keywords later together with the solution to fix the problem. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026123 Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 You mean other than having an invalid doctype, using HTML tags in a strict html document, leaving quotes off of attributes, and not closing tags properly? And that's just in the first four errors. When you have errors in your code, browsers have to guess how to interpret the errors. The very fact that they are errors means that there is no standard to how errors should be interpreted - each browser will do it in its own way. This makes cross-browser debugging extremely difficult. Which is why I said that step one is to get rid of all the errors in your code. 99% of the time that will fix 97% of your problems. And you have some MAJOR errors in your code, starting from the first line of your document. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026145 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Thank you, I have changes/fixed what I could and knew how to fix. The view in IE is still messed up.... Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026250 Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 It's much better, but 55 errors is still too many errors to be able to say anything conclusively. One of the big problems you have is that you are using & in your URLs in the code. You need to change that to & But you have others as well. Google the error, and you should find some ways to fix it. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026315 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Tried what you told me, and the number of errors remained the same, made no difference at all. Plus i have found that the rest of the errors are because I don't use CSS for image settings etc. I changed the document type and now I am down to 2 errors. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026346 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 but it's still a mess under IE :'( Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026351 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Down to 1 error; strange there is no Line 355 in my file, only 350 lines... Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026355 Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 The last error is because you don't have a closing tag on this form: <form action="flashchat.php" method="post" name="login"><table width="100%" border="0" cellspacing="0" cellpadding="2"> It may seem like I'm being a little pedantic on this, but a missing closing tag will cause problems below, as the browsers will think everything after the opening tag is part of the form. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026359 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Yeah Result: Passed But it's still a mess under IE! ;( Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026362 Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 Step one finished! Ok, the next thing to do is go through your elements, and make sure you don't have any side paddings/margins on elements with a set width. You also want to make sure you don't have any top/bottom paddings/margins on elements with a set height. For example, your sidebar is set with this CSS: float:left; padding:15px 20px; width:200px; IE renders paddings and margins differently than every other browser. So what you do is use two divs. So change your sidebar to this: <div id="sidebar1"> <div id="sidebar_padding"> // sidebar stuff </div> </div> And set your CSS like this: #sidebar1 { float:left; width:200px; } #sidebar_padding { padding:15px 20px; } This way the width is the same for the sidebar whether it's IE or another browser, and the padding will also render the same for all browsers, since the padding is not combined with a width. Find any other elements you have done this (combined a width with a margin and/or padding) and do the same thing - add an inner div, then put the margins/padding on the inner div. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026366 Share on other sites More sharing options...
KevinM1 Posted March 15, 2010 Share Posted March 15, 2010 Have you looked into a CSS reset? Essentially, it's a stylesheet that zeroes out all styling on all elements, which would then allow your custom CSS to be (hypothetically) rendered in the same way across browsers. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026368 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Nightslyr thanks, looks to complicated for me Haku still can't get it right... Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026371 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Got it... This was causing the problem: <table width="100%" border="0" cellspacing="0" cellpadding="2" Removed and it moved up the form Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026379 Share on other sites More sharing options...
haku Posted March 15, 2010 Share Posted March 15, 2010 Glad to hear that. But actually, you should take Nightslayrs advice, it's quite important. First thing I do on every site! Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026380 Share on other sites More sharing options...
KevinM1 Posted March 15, 2010 Share Posted March 15, 2010 Nightslyr thanks, looks to complicated for me What's so complicated about it? Cut & paste the code from one of the CSS reset pages the Google search shows, and save it in an external CSS file. Link to it before linking to your custom CSS. Voila, you're all set. I mean, here's the link to Eric Meyer's reset file: http://meyerweb.com/eric/tools/css/reset/reset.css It can't get much easier than that. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026382 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Nightslyr thank you, I thought it was more complicated. Will give it a go. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026389 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Done, what is it that it does exactly? Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026395 Share on other sites More sharing options...
vinnier Posted March 15, 2010 Author Share Posted March 15, 2010 Thank you all so very much for help and useful tips! Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026396 Share on other sites More sharing options...
haku Posted March 16, 2010 Share Posted March 16, 2010 Each browser has default CSS settings that are different from other browsers. A CSS reset sheet explicitly sets defaults so that all browsers are starting on a level playing field. Quote Link to comment https://forums.phpfreaks.com/topic/195246-how-to-fix-my-site/#findComment-1026815 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.