The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Precedence for font-size attribute in a class?
Woody20
post Mar 13 2012, 12:39 AM
Post #1


Novice
**

Group: Members
Posts: 27
Joined: 11-March 11
Member No.: 14,105



I have an unusual question, arising from a pgm which reads RTF and outputs HTML.

The pgm is outputting HTML like
CODE
<style>
.jus{ text-align: justify; }
.sz10{ font-size: 10pt; }
.sz17{ font-size: 17pt; }
.f0{ font-family: Times New Roman, Times, serif; }
.f32{ font-family: Verdana, sans-serif; }
</style>
<p class="f0 sz17 cl1 jus sz10" style="text-indent: 12pt;">
<span class="f32">Some sample text</span>

The intent is that "Some sample text" is 10-point Verdana, but it appears as 17-point. It looks like the <p> class gives the first definition of font-size (i e sz17) precedence over the second (sz10).

What I want to know is, is there a rule for which size will take precedence (first, last, or something else)? And is this rule, if there is one, standard HTML, or different among browsers?

A related question: would the same rule apply for other attributes (e g, font-family, justify vs left, etc)?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 25th April 2024 - 10:35 AM