For example (simplified), the CSS would look like this:
.submenu {width:150px;}
And then you'd insert the class statement into the appropriate HTML tag. For example:
<a class="submenu" href="https://xoops.org"></a>
As to the other question, could you post the line that's causing the error? Perhaps some here would know what the problem is.