View Full Version : new problem, cannot BOLD the font
s00263668
07-31-2006, 02:22 AM
This is my code in HTML
<table class="tblStyle"><tr><td>
<b>text in bold</b> text in normal
</td></tr></table>
And this is my code in css style sheet
.tblStyle{
font: 10 arial;
}
the effect i expect was: text in bold text in normal
but, at the end the effect is: text in bold text in normal
it looks like css style sheet has corrupt the display. can someone tell me how to solve this?
mburt
07-31-2006, 02:32 AM
I just tested this, and it does work. I don't see what the problem is
.tblStyle{
font: 10 arial;
}10 what? 10 pixels high? 10 ems? 10%? 10 miles?
Also, you should always specify a generic font in case the user doesn't have that font.
.tblStyle{
font: 110% Arial serif;
}
.tblStyle b {
font-weight: bold;
}
mburt
07-31-2006, 02:48 AM
I don't think he/she wants the whole thing to be bold.
I'm sure s/he doesn't. I suspect s/he wants the <b> element to be bold, as I've specified in that style. :)
mburt
07-31-2006, 03:10 AM
Oh, right.. its 2:00 in the morning, im half asleep right now, and i'm missing details. :)
s00263668
08-01-2006, 09:25 AM
I'm sure s/he doesn't. I suspect s/he wants the <b> element to be bold, as I've specified in that style. :)
you're right, i don't want the whole element to be bold
mburt
08-01-2006, 03:42 PM
Yeah, but he set the bold html element, (in the css) to be bold, regardless of what the class does to it.
Ex
You make a class, for div.
<style type="text/css">
.blah {
font:12px arial
}
</style>
</head>
<body>
<div class="blah">Test</div>
but, you can also define element properties in the style sheets
.blah b {
font-weight:bold
}
:)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.