CSS and XHTML Fix

Any idea how to fix this site? It’s really messsed up. Originally I had no doc type. Just <html>

Now when I changed to XHTML Transitional everythings seriously just screwed

Can someone help me fix the code a bit?

Also how do you do mouseover and out correctly in xhtml?

Thanks.

http://gameinfiniti.com/

WOW… where to begin… sigh…

I think the first step is for you to take a look at the w3c validator. This page has over 300 errors…

You’ve got alot of inline javascript (i guess?) embeded in onmousover=“” tags… I’m not familiar with this method, so I can’t really elaborate on it.

You need to start on this validator and start cleaning your code up. After you do a few passes cleaning up all the small misc stuff post again and I’m sure many will be happy to take a look.

lol yea i think i should change to 4.01 html transitional? Also how to change from table to css div solution? I’m not really sure because this is just a template i started with.

No way, Strict is what you want.

If you were learning how to do a sport, would you want a coach who just encourages you all the time and never tells you what you’re doing wrong, or do you want the coach who will tell you YER DOIN IT WRONG every time you screw up until you do it right?

Well, I want the second coach, even if he seems like an @ss, because I will get better from it.

Strict doctype lets the validator tell you ALL your mistakes. Transitional just hides them to make you feel better about your code.

If the page looks awful with the addition of a doctype, it means the page was specifically coded to look Most Jawsome in IE5 back in those heady days of Geocities, grunge bands, and the pre-dot-bomb bubble. Like, when animated gifs and flaming letters and a little “Best Viewed In Internet Explorer” badges were the rage.

Maybe you want to totally ditch the template and get a modern template. Those exist. It might me a LOT easier to deal with.

Edit:

example of a site which has not-bad css-based templates for free: http://www.freewebsitetemplates.com/ except of course I would recommend changing their Transitional sissy doctypes to a manly Strict : )

lol but it looks good can u help me convert it to strict plz?.. html strict or xhtml?

HTML, XHTML… doesn’t matter, depends on whether you like closing /> tags on empty elements like <link> and <img>

I personally use HTML4. It doesn’t need the Javascript hidden as CDATA. It works on all browsers. XHTML, when you use it to work on ALL browsers, is just mangled HTML with a cool-looking X in the front. As you can see, the SitePoint people really liked that X, it’s Xtreme. But, up to you. Strict is more important.

Again, instead of spending a lot of time changing the table to divs, I’d take a quick look around for something that looks mostly what you have except it was coded in this century.

html 4.01 strict is the current standard that all modern browsers follow so that’s the one to use unless you have a really good reason to use a different one. The transitional standards are for web pages originally written in HTML 3.2 that have yet to be fully converted.

The doctype should be the first thing you write for the page since it will affect everything else.

ok thx i will use xhtml strict

Well, really just about all your JavaScript should be linked externally so you don’t get conflicts and bloat. At the moment you seem to be using HTML4.01 with a mismatching DTD. You may want to try TidyGUI to speed-up the conversion and highlight some of those errors.