Topic: 5 Errors Found While Validating But I can't see them! WTF!? (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24102" title="Pages that link to Topic: 5 Errors Found While Validating But I can&amp;#039;t see them! WTF!? (Page 1 of 1)" rel="nofollow" >Topic: 5 Errors Found While Validating But I can&#039;t see them! WTF!? <span class="small">(Page 1 of 1)</span>\

 
Black Hat
Bipolar (III) Inmate

From: Sin City (Can you guess where?)
Insane since: Sep 2004

posted posted 11-18-2004 22:55

Ok, I went to validate my site and my errors are down from 10 to 5 (woot!).

Here is the validation link: click here to see results

You can view my site (I have removed ALL right click protection so you can view the source): http://lostcitytinnos.net/beta2/

Now could someone break these errors down, explain to me how they work, and show me how to correct each one?

Thanks much.

-----------------------------------------------
TiNNoS || My Forums || My Gallery

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-18-2004 23:03

the report of the validator is rather clear, no ?

there is no attribute "ALIGN" in the TABLE tag, neither in the IMG tag, nor in the DIV tag,
there is no attribute "HEIGHT" in the TD tag,
there is no attribute "WIDTH" in the TD tag.

Not to mention that these attributes are all about presentation, therefore they must be in the presentation layer of your page ... that is in the CSS.

Until you know it, you should ( read must ) read the DTD when you write some (X)HTML markup. It may seem hard to read at first, but after few hours, it's extremely easy.



(Edited by poi on 11-18-2004 23:06)

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 11-18-2004 23:04

I guess I don't understand where you are having a problem. The validator is (at least in this case) pretty straight-forward.

For instance, when the validator says
Line 68, column 36: there is no attribute "ALIGN"
it means go to line 68. See, you have the opening table tag there. See, your third attribute over where it says align="center".
It shouldn't. "align" doesn't exist.
It would be as if you put
<table width="500" border="0" ugapock="gogogogo">
No good.

Now, read the other 4 errors, replace words appropriately. Same situation.

This sort of information (align, height, etc) belongs in your CSS file, not your html file.

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 11-18-2004 23:05

Each of these errors is a case of using HTML attributes when you should be using CSS.

align="center" can be done with this CSS (assuming your page has a proper DOCTYPE):

margin-left:auto;
margin-right:auto;
width:500px;

align="right" can probably be done like this:

margin-left:auto;
margin-right:0;
width:500px;

align="top" for an object in a table cell can be done by adding

vertical-align:top;

to the table cell's CSS, I think.

width and height properties can be replaced by width and height CSS properties.


 

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-18-2004 23:07

wow.
3 replies in 3 minutes. That's a great combo

Black Hat
Bipolar (III) Inmate

From: Sin City (Can you guess where?)
Insane since: Sep 2004

posted posted 11-18-2004 23:09

Grr.. I'll try some of this out but now Im really confused...

-----------------------------------------------
TiNNoS || My Forums || My Gallery

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-19-2004 00:58

Be specific: what are you confused about?

Note: the majority of the errors here seem to be a matter of seperation of structure/style.

By using things like 'align' and 'height' (except for images), you are trying to use the structural markup to control the visual style - which should always be done using CSS.

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-19-2004 01:17

hum... I realize, that you may be confused by "there is no attribute X in ..." and misunderstand what the validator says. Actually it says that there is no attribute X in ... according to the specifications of HTML 4.01. Therefore you must get rid of the attribute X if you want to validate markup.

Black Hat
Bipolar (III) Inmate

From: Sin City (Can you guess where?)
Insane since: Sep 2004

posted posted 11-19-2004 03:27
quote:
DL-44 said:

Be specific: what are you confused about?

Note: the majority of the errors here seem to be a matter of seperation of structure/style.

By using things like 'align' and 'height' (except for images), you are
trying to use the structural markup to control the visual style - which
should always be done using CSS.



Ok here's my problem. You all say it should be done in .CSS but how? What do I remove? Must I specify a name for my tables? I mean, for example, in two of the tables, I have text aligned. The content is aligned left/top and the navigation is aligned right/top. Simplest way to understand is by visiting my site and seeing for yourself.

http://lostcitytinnos.net/beta2/

Now when I try to validate it gives me these errors: Click here to see the results of my attempted validation + the source

Well like I said you all keep saying "do this" and "do that" but I have zero idea how to "do this" and "do that". So far I've learned quite a bit on cleaning source, excetra, because some of you have taken time to walk me through it. Now thats what I need help here with. Tell me what I should to do in order to make it validate correctly. Should me examples, ect. Be detailed. Please.

-----------------------------------------------
TiNNoS || My Forums || My Gallery

DL-44
Maniac (V) Inmate

From: under the bed
Insane since: Feb 2000

posted posted 11-19-2004 03:43

Slime's post really sums it up in pretty thorough detail.

Don't be afraid to use classes.

As in <table class="thistable">

and in your css -

.thistable {
attribute:value;
}

you can set up some 'generic' styles and call them in teh html wherever you want those style attributes to apply.

Also, for some good basic intro to using CSS well, check out the Gurus Network CSS tutorials -
http://www.gurusnetwork.com/tutorials/coding/css/




(Edited by DL-44 on 11-19-2004 03:46)

Black Hat
Bipolar (III) Inmate

From: Sin City (Can you guess where?)
Insane since: Sep 2004

posted posted 11-19-2004 04:45

Now see DL-44 That actually told me how to do it with CSS. Thanks a lot man.

-----------------------------------------------
TiNNoS || My Forums || My Gallery

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 11-19-2004 04:50

Until you're familiar with them, you should keep CSS2 Specification open when you code.

:\ this link, and many others are in the CSS



(Edited by poi on 11-19-2004 04:52)



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu