View Full Version : Fixed 80 Errors, 6 to go and stuck!

07-18-2007, 12:52 PM
I have been having problems with resolution compatibility of my new website being built at :

It is best viewed at 1280x1024 - i say best - it just plain doesnt work currently on any other resolution. You guys suggested getting the code to validate for the homepage and that would be a great start - so off to work i went!

I have gone from around 85 horrid errors, to 6 pretty simple things errors found within a javascript and I dont know how to fix the last 6 errors.

I am using the http://validator.w3.org/ and if you run the source code for the homepage through that - maybe some of you could shed some insight on how to keep the validator happy here!

Thanks very much


07-18-2007, 01:03 PM
What a mess! Your code and the page in FF2!

You may be sorting through those validation errors, but you still have a long way to go after that to tidy up your code and make everything work as it should in all browsers!

As a hint I will say that style belongs in the head section of your page between the <head> and </head>. You also have an empty <ul> that you need to get rid of. As for the javascript errors I can help you I'm afraid but you might want to consider putting the javascript and CSS into external pages and linking to them in your head?

07-18-2007, 01:04 PM
In X(HT)ML you need to enclose JavaScript in CDATA tags. You did it with your CSS already (probably not being aware why), and while I havenít encountered any problem leaving those out there, they are required for JS code:

<script type="text/javascript">
// <![CDATA[
// Copyright 2003 Eddie Traversa
// http://www.dhtmlnirvana.com/
// free to use as long as this copyright notice stays intact
var tags = new Array( 'p','b');
var pixelArray = new Array('10','12','16','20','24','30','40');
var emArray = new Array('0.7','0.9','1.0','1.4','1.8','2.2','2.6');
var initSize = 3;

function fontSizer(inc,unit) {
if (!document.getElementById)
var size = initSize;
size += inc;
if (size < 0 ) {
size = 0;
if (size > 6 ) {
size = 6;
initSize = size;
getBody = document.getElementsByTagName('body')[0];
for (i = 0 ; i < tags.length ; i++ ) {
getallTags = getBody.getElementsByTagName(tags[i]);
for (k = 0 ; k < getallTags.length ; k++)
getallTags[k].style.fontSize = (unit=='px') ? pixelArray[size]+unit: emArray[size]+unit;
// ]]>

07-18-2007, 01:44 PM
Right! Now - its finally validated XHTML - what next! Thanks so far guys!

07-18-2007, 02:40 PM
Errrmmm.... read my above post?

07-18-2007, 03:13 PM
I did :

Remove unusued ul - done
Styles in head - they already were
Link javascript and styles to external documents - could do but it would do nothing but tidy up the code a little bit.

What more can i do now?

07-18-2007, 03:32 PM
You could look at it in Firefox and then start trying to fix that ;)

07-18-2007, 04:43 PM
haha come on now - of course I am! Thats what I am trying to do, but I genuinly dont know what needs changing!

07-18-2007, 06:25 PM
OK on ff i decreased the set of photos on the top right which should have moved that back up - but the menu is still flying in the middle of the page - WHY!!!!!!