Forum Moderators: not2easy
body {
margin:0;
padding:0;
} That will replace the proprietary
topmargin etc. attributes on your body opening tag. For the link style, you can add the following:
a {
color:0000ff;
} That will leave your HTML reading just this:
<body> And you will have the same visual effect on your pages. :)
What is wrong with this?
Line 35 column 72: there is no attribute "HEIGHT".
...ding="0" cellspacing="0" width="100%" height="63">
The 'height' attribute on the table element has never actually been part of the W3C spec, so would never validate. However, it has been supported by browsers in the past... although you might get into problems if you are using a proper DOCTYPE (standards mode), or XHTML in particular. Although browsers have supported it, I don't think it was ever recommeded... better leaving the browser decide how big the table should be, based on its contents.
So, in short, better not using it.
You could, however, set the height attribute on table cells (td's) - although that is now deprecated in the W3C Spec (so still allowed with a Transitional DOCTYPE)
If you still want to set the height of a table, however, and make it validate, you can set the height using CSS, something like:
table#specialtable {
height:63px;
}
The 'height' attribute on the table element has never actually been part of the W3C spec, so would never validate. However, it has been supported by browsers in the past... although you might get into problems if you are using a proper DOCTYPE (standards mode), or XHTML in particular. Although browsers have supported it, I don't think it was ever recommeded... better leaving the browser decide how big the table should be, based on its contents.So, in short, better not using it.
Like this [validator.w3.org]?
Yes, but you've got to learn the rules before learning how to break them. ;) Using
height on a table is like using embed, or target with a strict doctype. It may trigger an error, but you shouldn't sacrifice functionality or user benefit for errors which you know are inconsequential. The trick is knowing which errors are inconsequential or not. :)
Error Line 372 column 55: character "-" is not allowed in the value of attribute "TABINDEX".
...sedown="return v_mDown();" tabIndex="-1" target="VRSN_Splash" href="https://s
and
Warning Line 372 column 144: cannot generate system identifier for general entity "dn".
....com/splash?form_file=fdf/splash.fdf&dn=WWW.#*$!#*$!#*$!.COM&lang=en">
and
Error Line 372 column 144: general entity "dn" not defined and no default entity.
....com/splash?form_file=fdf/splash.fdf&dn=WWW.#*$!#*$!xx.COM&lang=en">
and
Error Line 372 column 146: reference to entity "dn" for which no system identifier could be generated.
...om/splash?form_file=fdf/splash.fdf&dn=WWW.#*$!#*$!.COM&lang=en">
and
Info Line 372 column 143: entity was defined here.
...n.com/splash?form_file=fdf/splash.fdf&dn=#*$!#*$!xx.COM&lang=e..
Every time I change something, the code stops working.
Any ideas? Been playing with this for 45 minutes.
One more
Error Line 373 column 29: there is no attribute "ONCONTEXTMENU".
<img oncontextmenu="return false;" alt="This Web site has chosen one
I tried removing this attribute and it distorted the verisign seal.
Yes, but you've got to learn the rules before learning how to break them. ;) Using height on a table is like using embed, or target with a strict doctype. It may trigger an error, but you shouldn't sacrifice functionality or user benefit for errors which you know are inconsequential. The trick is knowing which errors are inconsequential or not. :)
Excellent and practical argument.
I tend to validate because it is a debug aid, but that's because I do this part-time, and don't have a staff of people that can take two hours to track down a bug that can be found in five minutes with a validator failure.
Sites like Amazon, on the other hand, do nothing but, and they probably test more rigorously than we can imagine. Their site fails validation like crazy, but it works, and works well.
> Like this?Yes, but you've got to learn the rules before learning how to break them. ;) ....
Ha, I had not realised this site [webmasterworld.com] used the height attrib in this way (on a table), but like encyclo suggests, I doubt that it's compromising browser compatibility.
Just to note, this site [webmasterworld.com] also renders the page in quirksmode, which I believe is actually beneficial in this respect. The height *could* be rendered differently in standards mode (apart from not validating), leading to a
height="100%"(for example) causing problems.
and the second:
Error Line 331 column 29: there is no attribute "ONCONTEXTMENU".
<img oncontextmenu="return false;" alt="This Web site has chosen one
Any ideas?
Error Line 81 column 19: there is no attribute "BACKGROUND".
<td background="images/title_bar_bg.gif" width="20"> </td>
Use CSS to determine the background image:
<td style="background-image:url('images/title_bar_bg.gif'); width:20px;"> </td> Error Line 331 column 29: there is no attribute "ONCONTEXTMENU".
<img oncontextmenu="return false;" alt="This Web site has chosen one
I'm guessing the purpose of the proprietary "oncontextmenu" is to disable right-clicking. You can either remove it, or find a more compliant javascript solution :)
One more
Error Line 373 column 29: there is no attribute "ONCONTEXTMENU".
<img oncontextmenu="return false;" alt="This Web site has chosen oneI tried removing this attribute and it distorted the verisign seal.
How did it distort it?
Error Line 81 column 19: there is no attribute "BACKGROUND".
<td background="images/title_bar_bg.gif" width="20"> </td>
"Use CSS to determine the background image:
<td style="background-image:url('images/title_bar_bg.gif'); width:20px;"> </td> "
If you are displaying an image as a background-image, then it cannot be resized. You must either resize it before uploading it, or use an <img> element with either discrete width, height (or both), or a style (or class) that specifies the size. If it will be a background-image, then you need to position it correctly, and specify the repeat (I often use a 1-pixel wide/high image as a repeat-x or repeat-y to fill a space). Whatever is sitting on top of the image MUST be the correct size for the image to display, or it will be cut off.
If you are using floated <divs> over a <div> with a background-image, the floaters will not cause the substrate <div> to expand vertically, and you will need to put one more blank <div> in there with a "clear:both" attribute, or the background-image will not display.
Sounds like a pain, but properly done, it can work a charm. I use this method extensively in my sites. The major drawback is that, if you have an image-heavy site (like mine), it can take several seconds to render, as background-image attributes are given the very lowest priority in rendering pages. You are actually better off using background-color for areas you want to show up quickly (like white text over a dark background-image). The background-color will be eventually replaced by the background-image.