Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In CSS: how to specify the font you want as being BOTH monospace and sans-serif?

I'd like to tell the browser to use a font that is both monospace and sans-serif (usually the default monospace font has serifs, and the default sans-serif font isnt monospaced). Is there any way to specify this in CSS other than to provide a list of fonts I know to fit my criteria?

like image 226
chees Avatar asked Jan 21 '11 03:01

chees


People also ask

What is monospace font in CSS?

Courier New is the most widely used monospace serif font. Courier New is often used with coding displays, and many email providers use it as their default font. Courier New is also the standard font for movie screenplays.

What are the two font family in CSS?

Font Families: Serif, Sans-serif, and others In CSS (and in typography in general) there are five basic types, or families, of fonts: serif, sans serif, cursive, fantasy, and monospace.


1 Answers

CSS's font-family doesn't allow specifying more than one generic font keyword in a single font family name, so you'll either have to go with monospace or sans-serif.

like image 179
BoltClock Avatar answered Sep 28 '22 02:09

BoltClock