validator problem

liunx

Guest
I get conflicting messages from my validator in DWMX<br />
When I run the validator on :<br />
<br />
<div id="Layer3" style="position:absolute; width:320px; height:35px; z-index:1; left: 1346px; top: 12px"> <br />
<font size="-3" face="Arial, Helvetica, sans-serif"><br />
<table width="50%" border="0" cellspacing="3"><br />
<br />
I get table tag is not allowed within font.<br />
If I move table outside of font I get the opposite message.<br />
How do I solve?<!--content-->welcome to the forums :)<br />
<br />
font is deprecated anyway in favour of css, if you want to apply a particular font style to text inside a table use this:<br />
<br />
<table cellpadding.... style="font: bold 12px arial, helvetica, sans-serif;color:#000000;"><br />
<tr>td..... etc<br />
<br />
<br />
if you end up having a lot of css put it in an external stylsheet :)<!--content-->Yeah, the table tag cannot go inside font tags.<br />
<br />
If you use font inside a table, then the only valid place is inside a <td><font ...> ... </font></td> table cell.<br />
<br />
<br />
It sounds like you tried to do <table><font ...><tr><td> which is NOT valid.<!--content-->Can you tell me if I'm in the right direction then?<br />
<br />
<table width="50%" border="0" cellspacing="3" style="mystyle"><br />
<tr> <br />
<td width="37%" height="8"><br><br />
health insurance quotes<br><br />
<br />
I put in a line <link rel="stylesheet" href=http://www.htmlforums.com/archive/index.php/"/mystyle.css" type="text/css"><br />
between header tags.<br />
<br />
I create a style sheet called mystlye.css<br />
<br />
A {FONT-SIZE: 12px; TEXT-DECORATION: none}<br />
A:hover {FONT-SIZE: 12px; COLOR: green; TEXT-DECORATION: none}<br />
td { font-family: Arial, Helvetica, sans-serif; font-size: 16px}<br />
p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}<br />
b { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px}<br />
<br />
What style is applied to the words<br />
鎻宔alth insurance quotes?in above piece of html ??<br />
and is it appled to ALL text between the table tags in the code ?<br />
and does the style change inside text inside<td> inside these same table tags?<!--content-->the p style will style those words.<br />
If you style the <table> it will affect all text inside the table, the <td> style will affect text only inside that td.<!--content-->style="mystyle" <br />
<br />
is wrong, it should be<br />
<br />
class="mystyle"<!--content-->^ + where is you class mystyle?!<br />
<br />
in you mystyle.css you should have<br />
<br />
.mystyle {<br />
<br />
}<br />
<br />
from what you've shown us you do not have that.<!--content-->If you mess around with CSS long enough, you'll see some flaws in what some browsers assume for elements you didn't list in the CSS file. To avoid this you need to specify the defaults for all of the elements in order to avoid these browser inheritance bugs, so start with:<br />
<br />
body, form, h1, h2, h3, h4, h5, h6, input, li, ol, p, select, td, textarea, tr, ul {<br />
font-family: "trebuchet ms", arial, helvetica, sans-serif; or whatever.<br />
<br />
<br />
<br />
If you change anchor (link) properties, you must specify all four properties, and use one particular order:<br />
<br />
a:link {text-decoration: underline; color: #00c; background: transparent;}<br />
a:visited {text-decoration: underline; color: #609; background: transparent;}<br />
a:hover {text-decoration: none; color: #000; background: #ccc;}<br />
a:active {text-decoration: none; color: #c00; background: #ff0;}<br />
<br />
<br />
<br />
Use lower case for all definitions too.<!--content-->
 
Back
Top