• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to specify different fonts with different font sizes in Stylesheets?  RSS feed

 
Ruchita Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want Tahoma with font-size 13 px.
If this is not available , then I want to use Verdana with 11px.

With same font size & different fonts we can achieve by using comma delimiter as like

FONT-SIZE: 13px;

FONT-FAMILY: Arial, Tahoma.

But,with different size how to declare?
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think there's an option of specifying several sizes. For each size, you would have to create a separate style class.
 
Ruchita Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Annie Smith:
I don't think there's an option of specifying several sizes. For each size, you would have to create a separate style class.


Hai,

Thanks for u'r early reply.

But, for the same text , how to specify different style classes i.e
incase of first class font is not available on the system, we have to use second class font with different font size.

My HTML code is like this

<td width="390" valign="top" class = "textenglish">

<p class="textenglish">We can usually recognize a prospective restaurantjust by its name, which may recall the country that the owners

</p>
</td>

- Ruchita
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser matches the closest size in the font if that specific size is not found.
 
Ruchita Reddy
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Annie Smith:
The browser matches the closest size in the font if that specific size is not found.


Is there any way to handle by the CSS?
I don't want browser handling in this case.There is a probability of content mismatch in our application due to browser handling.


-Ruchita
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ruchita Reddy:

Is there any way to handle by the CSS?


Yes, you could specify it in CSS. But that should not matter much. As far as possible, specify the sizes which are always available in all fonts. Specifying other sizes would make the browser use its logic and produce weird results.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a thing to do with JSP. Moved to HTML/Javascript.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!