homepage Welcome to WebmasterWorld Guest from 54.227.40.166
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

This 34 message thread spans 2 pages: 34 ( [1] 2 > >     
Very VERY odd error
Please... what the heck is up?
Echo_Tyme




msg:616698
 4:26 am on Aug 12, 2004 (gmt 0)

I'm trying to construct a code for my new layout, i basically stripped it from the layout b4... but something very wrong is going on...

The left table is independent... but the center and right tables "stick" to eachother and i dunno why!

When I move or change sizes the center and right.. .move together... can u spot the error?

-------------------------------
<html>
<head>
<title>MM Version 5&nbsp;&nbsp;&nbsp;Version 4 "Forever"</title>

<link rel="stylesheet" href="/mmcss.css" type="text/css">

</head>

<BODY BGCOLOR="#FFFFFF"
TEXT="#000066"
LINK="#000066"
VLINK="#000066"
ALINK="#000066">

<div align="center">
<table width="780" border=0>
<tr>
<td width="100%">

<center><div style="text-align:center;width:750px; background-color:#000066;"><img src="/images/v4_main.gif"></div></center>

</td>
</tr>

<tr>
<td>

<div align="center">
<small><small>Currently this site is for Windows (Specifically Windows 98/ME/XP).</small></small>
</div>

<br>

</td>
</tr>

<!-- Side Banner -->

<div align="center">
<table width="780" border=0>
<tr>
<td>

<table width="150" border=1>
<tr>
<td width="100%">

<b>Version:</b> <?php require("http://example.com/include/version.txt");?>

<p></p>

<b>Navigation:</b>
<br>
<a href="/staff.php">Staff</a>
<br>
<a href="/about.php">About</a>
<br>
<a href="/thanks.php">Affiliates</a>
<br>
<a href="/version.php">Site Version?</a>
<br>
<a href="/versions.php">Previous Layouts</a>
<br>
<a href="/v5/">Version 5?</a>

<p></p>

<b>Project Guardian:</b>
<br>
<a href="/guardian/main.php">Home</a>
<br>
<a href="/guardian/virus.php">Anti-Virus</a>
<br>
<a href="/guardian/protection.php">Online Protection</a>
<br>
<a href="/guardian/dialer.php">Dialers</a>
<br>
<a href="/guardian/spam.php">Spam E-mail</a>
<br>
<a href="/guardian/wireless.php">Wireless Connection</a>
<br>
<a href="/guardian/tips.php">Various Tips</a>

<p></p>

<b>Contact:</b>
<br>
<a href="mailto:name@email.com?SUbject=Monthly Maintenance 101011">E-Mail</a>
<br>
<a href="aim:x?screenname=y&message=Hey+I+saw+your+site.">AOL Messenger</a>
<br>
<a href="http://edit.yahoo.com/config/send_webmesg?.target=echo_tyme">Yahoo! Messenger</a>

<p></p>

<b>Misc:</b>
<br>
<a href="mailto:name@yahoo.com?subject=About the Job">Help Wanted</a>
<br>
<a href="/problem.php">Site look wrong?</a>

</td>
</tr>
</table>
</td>

<!-- Main Table -->

<td valign=top width="450">
<div align="center">
<table width="450" border=1>
<tr>
<td width="100%">

August 4, 2004

<p></p>

&nbsp;&nbsp;&nbsp; Version 5 is not being worked on currently. Right now it is in the "brainstorm" stage. I have a few ideas
of the changes that will be made. I have the major ones listed in the table below. These will change every now and again, depending
on if anything new is thought of.

<p></p>

<b>What will be different in Version 5?</b>

<br>
<UL type="circle">
<LI> Php Template coding.
<LI> Old navigation system will be brought back.
<LI> Drop-down menu will be eliminated.
<LI> Demo (or full version) of product.
<LI> More to come!
</UL>

<p></p>

(Note: I have not begun work on Version 5. I am focussing on Version 4 right now, i'm jsut brainstorming for Version 5).

</td>
</tr>
</table>
</div>
</td>

<!-- Side Bar Begin -->

<td valign=top width="150">
<div align="center">
<table width="150" border=1>
<tr>
<td width="100%">

<center><a href="http://www.example.com/" target=_blank><img src="/images/anti_tcpa.gif" border=0></a></center>

<p></p>

<center>
<a href="http://mozilla.com/" title="Get Firefox - The Browser, Reloaded.">
<img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png"
width="110" height="32" border="0" alt="Get Firefox"></a>
</center>

<p></p>

<b>Affiliates:</b>
<br>

<SNIP>

</td>
</tr>
</table>
</div>
</td>

</td>
</tr>
</table>
</div>

<tr>
<td>

<br>
<br>
<br>
<br>

<center>
<small>
<small>

<script type="text/javascript"><!--
google_ad_client = "pub-0542779060331684";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_channel ="";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

<p></p>

<!-- Start "Layout" Copyright Code -->

<a href="http://www.example.com/dm.php">Menu provided by Someone</a>
<br>
<br>
<br>
Monthly Maintenance

<!-- End "Layout" Copyright Code -->

</small>
</small>
</center>

</td>
</tr>

</td>
</TR>
</table>
</div>

</body>
</html>
-------------------------

There is no doc type or encoding so that's not the problem... I don't know what i did but it's so odd.. and i can't figure it out.

[edited by: BlobFisk at 11:44 am (utc) on Aug. 12, 2004]
[edit reason] Examplified Post [/edit]

 

kaled




msg:616699
 8:40 am on Aug 12, 2004 (gmt 0)

The first tenet of solving mysterious behaviour issues is to simplify the problem.

Gradually strip out what you think is irrelevant junk saving each time as bug1.html, bug2.html etc until the bug vanishes in bug7.html (or whatever). You can then compare bug7.html and bug6.html (i.e. compare good code and bad code) and identify the problem. This will typically require the same method as before but using finer and finer editing - it could be as simple as a non-breaking space in the wrong place.

Kaled.

sonjay




msg:616700
 11:15 am on Aug 12, 2004 (gmt 0)

A quick glance showed me invalid code like this bit:
======
</td>
</tr>

<!-- Side Banner -->

<div align="center">
<table width="780" border=0>
======

You cannot have a <div> and a <table> immediately following a </tr>

I'd recommend you try validating the page, and fix the errors the validator throws at you.

Then see if you still have problems.

henry0




msg:616701
 12:02 pm on Aug 12, 2004 (gmt 0)

I will simplify the layout
do header colspan=3
then new TR & TD
first col
open a table close TR and table close TD not the final TR
second col
open a table close TR and table close TD not the final TR
third col
open a table close TR and table close TD and final TR

and footer colspan=3

Echo_Tyme




msg:616702
 9:59 pm on Aug 12, 2004 (gmt 0)

the last one with the colspan seems like a hassle. The code works I know that, but somehow in taking out code from the previous layout it messed up, or it's always been this way and i never noticed. It's just so odd that the two stick like that.

by the way... why can't u have a div and table right after a </tr>?

Oh woops just noticed i forgot to take the affilates out >.< sorry.

Reflection




msg:616703
 10:12 pm on Aug 12, 2004 (gmt 0)

why can't u have a div and table right after a </tr>?

Because you need to close your table first.

You should also choose a doctype.

Echo_Tyme




msg:616704
 11:55 pm on Aug 12, 2004 (gmt 0)

i'll choose a doctype once all this mess is cleared. I've messed with this code backwards and forwards and found nothing. and i do'nt have to close the table, i'm ending the data, then the row, then starting a new row there's nothing wrong in that. maybe witht he div part of it.

tedster




msg:616705
 3:02 am on Aug 13, 2004 (gmt 0)

i'll choose a doctype once all this mess is cleared

The best way to develop a page is first to make sure your mark-up is valid -- not just to see that it "works" visually in your test browser. Even if you see what you hoped to see in one browser, the HTML may well not work in another browser. This is especially true if there are errors in your mark-up and what you are seeing depends on one particular browser's error recovery routines.

I mention this because you cannot validate your HTML without a DTD beginning the document, and your work will be much smoother if you always write valid mark-up. So you are getting good advice when Reflection suggests you should add the DTD from the start.

Reflection




msg:616706
 3:36 pm on Aug 13, 2004 (gmt 0)

i do'nt have to close the table, i'm ending the data, then the row, then starting a new row there's nothing wrong in that.

Yes there is. You cant have elements in between <tr> tags, they need to be in td or th etc.

This is not valid:
...
</tr>
<div>
<tr>
...

and neither is this:
...
</tr>
<div>
<table>
...

g1smd




msg:616707
 7:59 pm on Aug 14, 2004 (gmt 0)

Why are your paragraphs empty and then you have loads of links not inside a container?

This MUST be run through the validator. The code is not valid at present. Try: [validator.w3.org...] first.

Echo_Tyme




msg:616708
 8:39 pm on Aug 16, 2004 (gmt 0)

Inside a container? what are you talking about?

And u can't tell me that's not legal to END the row, put data then open another row with TD, if u END it it's over, if u start it then YES the td ahs to come after.

Echo_Tyme




msg:616709
 8:44 pm on Aug 16, 2004 (gmt 0)

And that validator is crap.

run a check on:

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

and you'll see weird ass errors taht don't belong. Links that have subj in them are being read wrong. An AIM contanct code is wrong when it's perfectly right!

Saying i can't post a <p> when it's PERFECTLY legal.

[edited by: tedster at 11:59 pm (utc) on Aug. 16, 2004]

g1smd




msg:616710
 9:08 pm on Aug 16, 2004 (gmt 0)

>> Inside a container? what are you talking about? <<

Your page should be made up of headings, paragraphs, lists, tables and forms.

All content on the page must be inside a heading or inside a paragraph, or inside a list, or inside a table or inside a form.

No content shoule be hanging around outside of any of those containers.

>> And that validator is crap <<

No it isn't. You have failed to understand what correct markup is.

>> run a check on: [mm.********xxxx.com...] and you'll see weird ass errors that don't belong. Links that have subj in them are being read wrong. An AIM contact code is wrong when it's perfectly right! <<

Hmmm. There are 46 reported errors. All of those errors are real errors, often caused by a problem with something a line or two above where the error is being reported as.

That code is quite messy. You need to use the heading, paragraph, table, list and form code correctly. All of those 46 errors are easy to fix. You'll learn a LOT about writing correct HTML code by fixing them all.

For example you have to close the </table> after each of these </tr> tags. That is a single table cell can contain a complete table but it cannot just contain a "floating row" such as you have now.

</font>
</center>
</td>
</tr>
</td>
</tr>
</td>
</TR>
</table>

By the way, try to do all tags and attributes in lower case too. Using "find and replace" with a text editor can fix all that in a matter of minutes.

[edited by: g1smd at 9:14 pm (utc) on Aug. 16, 2004]

encyclo




msg:616711
 9:11 pm on Aug 16, 2004 (gmt 0)

Firstly, you might want to remove that link to your site.

And that validator is crap.

In what way? I validated the page anyway, and every single one of the errors listed was genuine. You've got no doctype, many unquoted attributes, a ton of unescaped ampersands and a bunch of nesting problems. All the information is given as to the precise location of the problems in the source code.

Don't forget that you can get a cascade of errors - one improperly-nested tag, and it can throw out a whole load of resulting errors. Start at the top (by adding a doctype for HTML 4.01 Transitional), check the URLs in the links for ampersands and replace & by &amp; and then you can start looking at the nesting problems.

Echo_Tyme




msg:616712
 8:51 pm on Aug 17, 2004 (gmt 0)

Lol no i get most of em, and the code isn't even mine, my friend let me use it from his site. The one i'm coming up with now is alot neater and easier to read. And what elements are floating? Everything is in a table, a messy table, but it's there.

And no like aim:message etc etc that's a real code that works perfectly and used on many sites but the validator doesn't understand that (oddly).

There were others that made no sense what-so-ever. Like how certain tags can't be put here and this can't be put there, when I relaly see no error. Ya I know the errors I have but the aim: one makes no sense. Oh ya and the javascript taht's what it was. For the menu, that was created by a company lol and it's hard to believe that it comes up with an error. The error is like... 1&2 or something isn't valid...

Oh and a link I had, it said the link was wrong... it had an & in there... but it was alink! not a part of my code lol. How in the heck can that be wrong, i'm linking to a page yet it hates that when it shoudln't be my error.

And ya i'm testing my doctype right now, i have to fix alot b4 i really put that in, and like i said i understand most of them but the ones i listed below make no sense.

And sorry about the link but you had to see what i was seeing or you woulda never understood what i was saying, that and i wasn't in the best mood to be posting lol.

Oh ya and someone said to not have anything floating... so if i did

<p>
navigation:
<br>
link
<br>
link
</p>

that's fine? And why not just kinda have it as was?

g1smd




msg:616713
 9:30 pm on Aug 17, 2004 (gmt 0)

You'll find it easier to apply CSS styling to the elements on your page if they are in containers.

You'll find it a lot easier to understand your code in 6 months time if each part of the page is in a container.

The 1&2 errors are real errors. They can be easily fixed. The browser knows that if you put &copy; that you want a copyright symbol and if you want a non-breaking-space you'll put &nbsp; in your code.

So, you have an &2 in your code, so what is the browser to do with that? It doesn't know what entity to are referring to: &2 isn't a valid entity. To be valid you have to escape the ampersand. That is, when you want to use an & on your page as an & you have to put &amp; which makes a real ampersand in the browser.

So 1&2 should be 1&amp;2 to be valid.

An & is used as the prefix to an entity code, like &nbsp; or &copy; etc. The entity code for an ampersand to display as an & is simply &amp; you see.

g1smd




msg:616714
 9:40 pm on Aug 17, 2004 (gmt 0)

Now, 45 errors left to fix. They are ALL fixable.

Echo_Tyme




msg:616715
 9:42 pm on Aug 17, 2004 (gmt 0)

Ah so i'd have to change that... well ok maybe u can explain this too b/c this is really odd.

When I validated before the validator said I needed to have something like color="#000033", now it's saying that it's not right, I think it's saying I need color=000033 (HTML strict is sayign this). so now in strict u don't use the "?

it's also saying my <center> codes are undefined?

I have a border=0 and it's saying there is no border defined... I do'nt want a border taht's the point lol.

And for the last one (i think) i have my links sometimes have a:

target=_blank and it's saying there is no target attribute. That's how I was taught to put it, it should be correct html.

g1smd




msg:616716
 9:46 pm on Aug 17, 2004 (gmt 0)

Before worrying about any of that, fix all the & errors and upload the page again.

I can't look at a long list of errors like that. Fix the easy ones so I can see the wood from the trees.

Note that target does not exist in XHTML, but we will come back to that after all the & errors are fixed.

Echo_Tyme




msg:616717
 9:47 pm on Aug 17, 2004 (gmt 0)

lol but i'm trying html strict, oh boy lol i'm gonna get a lesson today.

g1smd




msg:616718
 9:50 pm on Aug 17, 2004 (gmt 0)

Ah, the XHTML reference was my mistake. Sorry, I'm fixing sites for 5 different people all at the same time here. I mixed you up with another site. Got it now. Fix all the & and I'll take another look.

Usually color="#000033" should be right. There must be some other problem.

g1smd




msg:616719
 9:56 pm on Aug 17, 2004 (gmt 0)

After fixing all the & to be &amp; we are down to 30 errors, so 15 were very easy, no?

Next the attribute values need to be "quoted".

That is, all the values for src and language and type all inside the script tags need to be in "quotes". Also make sure the tags are all in lower case.

The closing tag of </script> needs to be escaped. How? Easy: <\/script> - use find and replace.

Echo_Tyme




msg:616720
 10:00 pm on Aug 17, 2004 (gmt 0)

Actually i fixed a few other errors lol

Why would I need \/? Isn't it just another tag and it's not a php variable or anything.

g1smd




msg:616721
 10:05 pm on Aug 17, 2004 (gmt 0)

The \ escapes the / which otherwise confuses the parser when it sees a / inside a document.write statement. The \ hides the / from the parser.

Put the attribute values into quotes next, and use lower case for your tags too. That is all the block of code in and around the <script>s.

When you have time, put EVERY attribute value in quotes too, all the way down the page, and every tag in lower case. Use: "find <TR> and replace <tr>" then "find <TD> and replace <td>" in the text editor.

[edited by: g1smd at 10:09 pm (utc) on Aug. 17, 2004]

Echo_Tyme




msg:616722
 10:06 pm on Aug 17, 2004 (gmt 0)

.... something very bad just happened... the entire site jsut screwed up lol.

Nvm my fault, i got it. And id din't do that \/ and it's showing up as fine.

g1smd




msg:616723
 10:12 pm on Aug 17, 2004 (gmt 0)

It will probably right itself when all the errors are fixed.

You only need to escape <\/tag> on tags that are INSIDE document.write staements. You have done that just fine.

Next, to see what your table code is all about, you need to indent your code. I use a 2-space indent on the first table, then a 4-space indent on a table within that table and so on. Edit your code so you can see the nesting, then it will be clear if any tags are unclosed (or are closed in the wrong order).

Get all the tags in lower case too. It is a simple find <THIS> and replace with <this> then find </THAT> and replace with </that> for about 12 types of tags.

Get all of the attribute values inside "quotes" too; so you will then have <blah something="value"> every time.

[edited by: g1smd at 10:22 pm (utc) on Aug. 17, 2004]

Echo_Tyme




msg:616724
 10:16 pm on Aug 17, 2004 (gmt 0)

Your talking about the ones on the end of the validation right?

If i delete those the entire code goes haywire, so when it says they're not open... it's lying lol b/c when i take it out, it goes nuts and makes everything screw up.

2 more ^.^

I don't understand the script one and the doc type is gonna be HTML script i beleive

[edited by: Echo_Tyme at 10:26 pm (utc) on Aug. 17, 2004]

g1smd




msg:616725
 10:26 pm on Aug 17, 2004 (gmt 0)

Do the indent thing on your code, make the tags lower case, and put the attribute values inside "quotes" and then I'll take another look.

You also have double tags in some places like <small><small> -- no point opening something twice. get rid of one. Check how many closing tags you have there too!

Your final script error is missing the type="text/javscript" attribute too.

[edited by: g1smd at 10:29 pm (utc) on Aug. 17, 2004]

Echo_Tyme




msg:616726
 10:27 pm on Aug 17, 2004 (gmt 0)

I fixed all that lol and the <small><small> should be a font 1 now.

Oh nvm i hit that now.

and above i meant Strict, HTML strict

I put it into strict mode to find 40 errors oddly enough.

Transitional will do for now, i'm planning a new layout as it is but i'm learning how to fix that one now.

[edited by: Echo_Tyme at 10:32 pm (utc) on Aug. 17, 2004]

g1smd




msg:616727
 10:31 pm on Aug 17, 2004 (gmt 0)

You can't end with

</table>
</table>
</body>

You are masking an error with that. Do the INDENT thing on your code - make it easier to follow what is going on.

Next put your paragraph tags AROUND the paragraphs instead of BETWWEN them.

Instead of

blah blah

<p></p>

blah blah

change it to

<p>blah blah</p>

<p>blah blah</p>

[edited by: g1smd at 10:34 pm (utc) on Aug. 17, 2004]

This 34 message thread spans 2 pages: 34 ( [1] 2 > >
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved