Click to See Complete Forum and Search --> : CSS warning errors, but don't know why.


JMRKER
05-22-2007, 02:51 PM
I'm using this definition in an HTML file:

<style type="text/css">
.Tablature { font: normal normal 12px courier,monospace; }
</style>


I have this element defined later in the script within a table cell:

<td valign="top">
<div class="Tablature" id="TabDisplay"></div>
</td>

I write to the <div> element with document.getElementById('TabDisplay').value = 'Text information sent here';

I'm getting these errors in my FireFox browser on an iMac:

------------------------------------------------------------------------------------
Warning: Error in parsing value for property 'font'. Declaration dropped.
Source File: file:///Volumes/USB20FD/BanjoTab.html
Line: 0
------------------------------------------------------------------------------------
Warning: Expected ':' but found ';'. Declaration dropped.
Source File: file:///Volumes/USB20FD/BanjoTab.html
Line: 0
------------------------------------------------------------------------------------


Does anybody have an idea what I'm doing wrong?
Thanks for any correcting comments.

ray326
05-22-2007, 03:23 PM
It really looks like it's seeing font; instead of font: or possibly monospace: instead of monospace; but I don't use the shorthand font style.

JMRKER
05-22-2007, 06:08 PM
Thank you.

Per your suggestion I changed to:

<style type="text/css">
.Tablature { font-size: 12px; font-family: courier,monospace; }
</style>

and have not yet had a problem.

I think I have learned a valuable lesson. Thanks again!