Author Topic: How to fix my site?  (Read 963 times)

0 Members and 1 Guest are viewing this topic.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
How to fix my site?
« on: March 14, 2010, 09:04:31 PM »
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]

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: How to fix my site?
« Reply #1 on: March 14, 2010, 09:47:24 PM »
Step one is to fix the 926 errors in your HTML.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #2 on: March 14, 2010, 09:57:40 PM »
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.  :shrug:
I will fix the keywords later together with the solution to fix the problem.

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: How to fix my site?
« Reply #3 on: March 14, 2010, 10:47:56 PM »
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.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #4 on: March 15, 2010, 05:52:55 AM »
Thank you, I have changes/fixed what I could and knew how to fix. The view in IE is still messed up....

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: How to fix my site?
« Reply #5 on: March 15, 2010, 08:32:25 AM »
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.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #6 on: March 15, 2010, 09:15:55 AM »
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.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #7 on: March 15, 2010, 09:24:48 AM »
but it's still a mess under IE  :shrug: :'(

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #8 on: March 15, 2010, 09:32:45 AM »
Down to 1 error; strange there is no Line 355 in my file, only 350 lines...

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: How to fix my site?
« Reply #9 on: March 15, 2010, 09:46:35 AM »
The last error is because you don't have a closing tag on this form:

Code: [Select]
<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.


Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #10 on: March 15, 2010, 09:50:27 AM »
Yeah   Result:    Passed

But it's still a mess under IE! ;(

Offline haku

  • Guru
  • Freak!
  • *
  • Posts: 5,707
  • Old Man
    • View Profile
Re: How to fix my site?
« Reply #11 on: March 15, 2010, 09:57:42 AM »
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:

Code: [Select]
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:

Code: [Select]
<div id="sidebar1">
  <div id="sidebar_padding">
    // sidebar stuff
  </div>
</div>

And set your CSS like this:
Code: [Select]
#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.

Offline KevinM1

  • Global Moderator
  • Fanatic
  • *
  • Posts: 3,912
  • Gender: Male
    • View Profile
Re: How to fix my site?
« Reply #12 on: March 15, 2010, 09:59:46 AM »
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.
Don't go to w3schools.  Here's why
Every time a PHP coder uses 'global' a kitten dies.

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #13 on: March 15, 2010, 10:05:21 AM »
Nightslyr thanks, looks to complicated for me ;)

Haku still can't get it right...

Offline vinnierTopic starter

  • Enthusiast
  • Posts: 56
    • View Profile
Re: How to fix my site?
« Reply #14 on: March 15, 2010, 10:09:48 AM »
Got it... This was causing the problem: <table width="100%" border="0" cellspacing="0" cellpadding="2"

Removed and it moved up the form