7 replies [Last post]
mayonaise
Offline
Regular
Last seen: 16 years 24 weeks ago
Joined: 2004-08-06
Posts: 29
Points: 0

below are pieces of my CSS and HTML. the text inside the tags will not come out looking bold unless i remove everything from the CSS class except for the color. if i do this, however, the boldness disappears in linux versions of mozilla and konqueror (are the versions just too old?). i'm currently testing with firefox 0.9.2 and IE 6 (fully updated) on windows 2000.

this is so frustrating!! i don't understand what's wrong with the CSS at all! font-style: bold; and font-weight: bold; don't work - the text is inside a tag.. <STRONG></STRONG> has no effect...... Sad

CSS:
.courses #sideHeader {
font-family: arial, helvetica, sans-serif;
font-style: bold;
color: #C080C0;
}

...
HTML:
<DIV class="courses">
...
Courses
...
</DIV>

mayonaise
Offline
Regular
Last seen: 16 years 24 weeks ago
Joined: 2004-08-06
Posts: 29
Points: 0

can't make text bold?!

forgot to disable HTML:

.courses #sideHeader {
   font-family: arial, helvetica, sans-serif;
   font-style: bold;
   font-weight: bold;
   color: #C080C0;
}

<DIV class="courses">
...
<B id="sideHeader">Courses</B>
...
</DIV>

Stu
Stu's picture
Offline
Enthusiast
Bristol uk
Last seen: 17 years 4 days ago
Bristol uk
Joined: 2004-01-20
Posts: 282
Points: 0

can't make text bold?!

Use
font-weight:bold;

It's not what you do it's the way that you do it.
So do it with STYLE
http://www.s7u.co.uk

mayonaise
Offline
Regular
Last seen: 16 years 24 weeks ago
Joined: 2004-08-06
Posts: 29
Points: 0

can't make text bold?!

Stu wrote:
Use
font-weight:bold;

this does not work either Crying

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 40 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

can't make text bold?!

Be best if you could post the rest of the html and css. There maybe something else influencing the code.

Also, which doctype are you using?

The next sentence is true. The previous sentence is false. Discuss...

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 43 weeks 6 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

can't make text bold?!

Don't do <b id="sideheader">, if anything do

<div id="sideheader"> <b> text </b> </div>

but I can't see why you don't just use a heading tag, eg:

h2 {
font-weight: bold;
color: #c080c0;
etc
}

Verschwindende wrote:
  • CSS doesn't make pies

mayonaise
Offline
Regular
Last seen: 16 years 24 weeks ago
Joined: 2004-08-06
Posts: 29
Points: 0

can't make text bold?!

alright, i figured the problem out and the solution made me feel pretty stupid.. i was simply using the wrong font in the style sheet. initially i had chosen "verdana" as the primary font in the <FONT> tag, but when i removed that and applied a CSS style to it, i absent-mindedly copied and pasted "arial, helvetica, sans-serif". at the size i had the font, bold arial is not bold in windows web browsers. linux, however would choose sans-serif and make that bold - thus the discrepancy. d'oh!

thanks for all the replies!

co2
co2's picture
Offline
Leader
UK
Last seen: 12 years 40 weeks ago
UK
Joined: 2003-09-17
Posts: 721
Points: 0

can't make text bold?!

Nothing better than figuring out yourself?! Well done! Tongue

Laughing out loud

The next sentence is true. The previous sentence is false. Discuss...