|
Posted by Steven (remove wax and invalid on May 29, 2005, 2:43 pm
Please log in for more thread options
Adrienne wrote:
> Gazing into my crystal ball I observed "Steven (remove wax and invalid for
> $a726171b@news.hal-pc.org:
>
>
>>I'm moving an old page to a new host, and trying to modernize it at the
>>same time. There are two little problems that are driving me nuts.
>>
>>1. Validation of www.marzolian.com/index.html says:
>>
>>Line 33, column 5: element "NOTE" undefined
>><note>Last revised: May 29, 2005</note>
>>"You have used the element named above in your document, but the
>>document type you are using does not define an element of that name."
>>
>>The error is with "note" What did I do wrong?
>
>
> There is no element named "note". Period. You cannot just make up
> elements to your liking.
>
>
>>2. The last line is supposed to have the "note" style, defined in the
>>style sheet (marzolian.css). What's odd, that definition includes a
>>font size. If I change this size in the style sheet, it is reflected
>>onscreen; in other words, despite the error, Firefox at least is reading
>>the font size. However, the center part of this definition is not
>>getting applied.
>>
>>I suspect that the two problems have the same fix. What is it?
>
>
> You are applying centering to an element that does not exist. Block
> elements can have their contents centered. Inline elements, since they are
> not block, cannot. The browser does not know whether the "note" element is
> block or inline, so it does not center it at all.
>
>
>>3. This isn't a problem, but a preference: Rather than fix the font
>>size for "note" I would rather just make it <small>. How can I do that
>>in a CSS file?
>
>
> Use a percentage, like 80%, which will make the font size 80% of the users
> chosen font size. The font size you are using now is way too small.
>
>
>>Thanks.
>
>
> What you really want is:
> <div class="note">Last revised May 29, 2005</div>
>
> And in your CSS:
> .note {font-size:80%; text-align:center;}
Thanks very much, all fixed now.
What threw me, I think, is that "style" means something different in
programs such as Microsoft Word. There I can create entirely new styles
such as "Note" or "myHeading1" and apply them throughout a document, or
export them to new documents. A Word style can be based on, or inherit,
attributes from existing styles. The system has advantages that are
similar to those of using CSS.
The problem was, the online reference material on CSS and styles that I
have been reading doesn't make it clear that you can't make up your own
styles that way.
Thanks again. I have been learning a lot from this group for the past
few weeks.
--
Steven
HOUSTON - First in Oil, First in Space,
Last in the National League Central Division
|