Reputation: 8722
This is my complete test html:
<!DOCTYPE>
<html>
<head>
<title>DIV Font</title>
<style>
.my_text
{
font-family: Arial, Helvetica, sans-serif
font-size: 40px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="my_text">some text</div>
</body>
</html>
The font-family & font-size attributes are being ignored.
Why? Why is font-weight used? What do I need to do so I can specify the font-family & font-size?
Thank you
Upvotes: 17
Views: 172143
Reputation: 51
Append a semicolon to the following line to fix the issue.
font-family: Arial, Helvetica, sans-serif;
Upvotes: 4
Reputation: 5079
You need a semicolon after font-family: Arial, Helvetica, sans-serif
. This will make your updated code the following:
<!DOCTYPE>
<html>
<head>
<title>DIV Font</title>
<style>
.my_text
{
font-family: Arial, Helvetica, sans-serif;
font-size: 40px;
font-weight: bold;
}
</style>
</head>
<body>
<div class="my_text">some text</div>
</body>
</html>
Upvotes: 28