[DOPEY NEWBIE] Why doesn't Mozilla display text in bold?

M

marked

Hi all,

This must be a bit of a stupid question (ie: I've done something wrong, no
doubt).

I've created a site which displays fine in IE, but Mozilla/Navigator don't
display the bolded text. For example:

"<P><b>text go here</b> - blah blah" displays correctly in IE, but the "text
go here" bit isn't bolded in Mozilla.

Checked the ALT.HTML FAQ stuff, but no answer there. Done a bit of
searching, but all I can find is problems when tags aren't closed properly,
and mine are all closed properly except for optional tags like </P>. I've
tried using <strong> instead of <b>, I've tried specifying font weight under
"b" in my stylesheet, but nothing appears to work.

What have I done wrong?

TIA,
Mark
(e-mail address removed)
 
C

Chris Morris

marked said:
I've created a site which displays fine in IE, but Mozilla/Navigator don't
display the bolded text. For example:

"<P><b>text go here</b> - blah blah" displays correctly in IE, but the "text
go here" bit isn't bolded in Mozilla.

What have I done wrong?

You've not posted a URL of an example. Try doing that and it might
help fix the problem.
 
D

Dave Saville

On Tue, 09 Sep 2003 08:06:21 GMT, marked wrote:

Checked the ALT.HTML FAQ stuff, but no answer there. Done a bit of
searching, but all I can find is problems when tags aren't closed properly,
and mine are all closed properly except for optional tags like </P>. I've
tried using <strong> instead of <b>, I've tried specifying font weight under
"b" in my stylesheet, but nothing appears to work.

Dunno with out a URL to go check - but where *is* the alt.html FAQ?

Regards

Dave Saville

NB switch saville for nospam in address
 
M

marked

Dave Saville said:
On Tue, 09 Sep 2003 08:06:21 GMT, marked wrote:
Dunno with out a URL to go check - but where *is* the alt.html FAQ?


Hi Dave,

FAQ is at http://html-faq.com

Content isn't posted yet sorry - but here's a copy of the relevant source
for one of the pages if that helps any (I've taken out the actual text and
some meta tags to save space, not that they're relevant to the
problem).......................


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Page Title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="EN">
<meta http-equiv="Pragma" content="cache">
<more meta tags.........blah blah blah>

<link href="scripts/site.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="scripts/images.js"></script>
</head>

<body onLoad="MM_preloadImages('images/news2.gif')">

<table width="100%" border="2" cellspacing="2" cellpadding="2">
<tr>
<script language="JavaScript" src="scripts/header.js"></script>
</tr>
<tr>
<td>
<script language="JavaScript" src="scripts/sidebar.js"></script>
</td>
<td colspan=2><img src="images/pageimg.gif"> <br>
text text text
<P>
<table width="100%" border="0" cellspacing="5" cellpadding="5">
<tr>
<td><b>text</b></td> <--------- these bits don't go bold in
Mozilla
<td><b>text</b></td> <--------- is it because they're in a
nested table?
<td><b>text</b></td> <--------- I have another page with the
same problem
</tr> but no
nested table
<tr>
<td><img src="images/img3.gif"></td>
<td>text</td>
<td>text</td>
</tr>
<tr>
<td><img src="images/img2.gif"></td>
<td><a href="#"
onclick="javascript:window.open('link')">text</a></td>
<td>text</td>
</tr>
<tr>
<td><img src="images/img1.gif"></td>
<td><a href="#"
onclick="javascript:window.open('link')">text</a></td>
<td>text</td>
</tr>
</table>
</td>
</tr>
</table>

</body>
</html>


Thanks
Mark
 
M

Mark Parnell

Mark said:
http://validator.w3.org should give you some pointers.

I just tried the code you posted elsewhere in this thread, and it works fine
for me in Mozilla.

You should still validate as above, though. And you should put a complete
Doctype in the top of your document, too.
 
M

marked

Mark Parnell said:
I just tried the code you posted elsewhere in this thread, and it works fine
for me in Mozilla.

You should still validate as above, though. And you should put a complete
Doctype in the top of your document, too.

--

Thanks Mark. I had a play, and it looks like if I view the text using
Mozilla with Text Zoom at (100%), it doesn't display. However, if I
increase zoom over 100%( ie: 120, 150, 200%), the bold appears correctly.
Also, if I decrease it to 50%, bold appears correctly. Could be a problem
with my stylesheet text definition........

BTW, I validated this and all my pages on the W3C validator, and the are all
HTML 4.01 compliant - no errors. I also used the echoecho.com validator,
and got a result of excellent (due to "spelling mistakes" in names and
places etc - otherwise perfect)

Thanks for your time looking at this.
Mark
 
D

Daniel R. Tobias

marked said:
<title>Page Title</title>

Hopefully you have a more meaningful title on your real page...
http://webtips.dan.info/titles.html
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Language" content="EN">
<meta http-equiv="Pragma" content="cache">

These Meta tags are cheap plastic substitutes for real server-provided
HTTP headers; you're best off getting rid of them and having your server
send the right headers to begin with. (If you're using an Apache
server, you can do a lot with a .htaccess file.)
<link href="scripts/site.css" rel="stylesheet" type="text/css">

That's probably where the problem is... we'd have to see your
stylesheet, but maybe it's defining text attributes that take precedence
over presentational HTML, like suggesting that all text be non-bold.
<script language="JavaScript" src="scripts/images.js"></script>

Or maybe your embedded scripts are messing around with the document
object model in some way? Without seeing them, we can't tell.
<td colspan=2><img src="images/pageimg.gif"> <br>

You ought to have ALT attributes for all your images, and it's usually a
good idea to specify WIDTH and HEIGHT as well.
<td><a href="#"
onclick="javascript:window.open('link')">text</a></td>

Using a href="#" for links intended to have "side effects" via "onclick"
is one of the worst "innovations" that anybody ever came up with for the
Web, and unfortunately every designer seems to be imitating it
slavishly. You should at least end your onclick attribute with ";return
false" so that the normal "href" link isn't followed, to prevent the
browser from jumping to the top of the page, changing the URL bar to add
the "#" mark at the end, and adding another entry to the back-button
stack. But, better yet, you should also replace the "#" with a
meaningful link for non-JavaScript users, like this:
<a href="link" onclick="window.open('link'); return false">text</a>
Also note that the JavaScript in the onclick attribute shouldn't be
preceded by "javascript:", as this is used only when the script is being
used in a context where a URL is expected.
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 1/09/2003

Some viruses these days are including lines like this, so it's certainly
nothing to be paid any attention to.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top