Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Problem with bold font not being used

Reply
Thread Tools

Problem with bold font not being used

 
 
Doug Miller
Guest
Posts: n/a
 
      05-16-2011
In article <(E-Mail Removed)>, Martin <(E-Mail Removed)> wrote:
>On Mon, 16 May 2011 09:21:51 +1000, dorayme <(E-Mail Removed)>
>wrote:
>
>>Under no circumstances, no matter how beguiling or cunning or
>>polite or rude or sarcastic or impatient a request by anyone here
>>for a URL to your page, do not succumb. Never give a URL so that
>>everyone can see exactly what is going on because the matter is
>>then in danger of being settled too quickly.

>
>Does anyone here know of an HTML newsgroup that is populated by ADULTS
>that are capable of answering questions without resorting to snide
>comments?
>

In less time than it took you to type that, you *could* have typed "Oh, sorry,
here's the URL: http://www.its_your_fault_that_I_dont_know_what_Im_doing. com"
 
Reply With Quote
 
 
 
 
jeff
Guest
Posts: n/a
 
      05-16-2011
On 5/15/2011 5:34 PM, Martin wrote:
> I have these entries in a .css file that is linked to several
> different web pages:
>
> body
> {font-family:arial; font-weight:bold;
> background-image:"../WebGraphics/background.gif"; }
>
> table
> {font-family:arial; font-weight: bold;}
>
> But on some pages, the bold font is not being used in a table. The
> only thing I can see is that these tables happen to be in a FORM.
> Could that be the problem? Or should I be looking for something else?


Unknown variables including which UA and which doctype.

Old and funky fix used to be:

table,tr,td{
font-family: Arial, sans-serif;
}

Arial should be capitalized, btw.

With modern browsers and doctypes that should not be needed.

mung
 
Reply With Quote
 
 
 
 
Martin
Guest
Posts: n/a
 
      05-16-2011
On Sun, 15 May 2011 23:29:14 -0700, richard <(E-Mail Removed)>
wrote:

>On Sun, 15 May 2011 14:34:50 -0700, Martin wrote:
>
>> I have these entries in a .css file that is linked to several
>> different web pages:
>>
>> body
>> {font-family:arial; font-weight:bold;
>> background-image:"../WebGraphics/background.gif"; }
>>
>> table
>> {font-family:arial; font-weight: bold;}
>>
>> But on some pages, the bold font is not being used in a table. The
>> only thing I can see is that these tables happen to be in a FORM.
>> Could that be the problem? Or should I be looking for something else?

>
>why not try using:
>form {font-weight:bold;}
>if you want to be more specific, give only that item a unique class name
>and style it through that class name.
>Or use inline styling.


Thanks, Richard

I moved the css statements from the external file into the page's
<head> section and everything appears just fine now.

I had this same problem on another page (that used a different .css
file). Making the same kind of change fixed that one also.

Doesn't make any sense but it works.

Thanks again.
 
Reply With Quote
 
richard
Guest
Posts: n/a
 
      05-16-2011
On Mon, 16 May 2011 10:03:34 -0700, Martin wrote:

> On Sun, 15 May 2011 23:29:14 -0700, richard <(E-Mail Removed)>
> wrote:
>
>>On Sun, 15 May 2011 14:34:50 -0700, Martin wrote:
>>
>>> I have these entries in a .css file that is linked to several
>>> different web pages:
>>>
>>> body
>>> {font-family:arial; font-weight:bold;
>>> background-image:"../WebGraphics/background.gif"; }
>>>
>>> table
>>> {font-family:arial; font-weight: bold;}
>>>
>>> But on some pages, the bold font is not being used in a table. The
>>> only thing I can see is that these tables happen to be in a FORM.
>>> Could that be the problem? Or should I be looking for something else?

>>
>>why not try using:
>>form {font-weight:bold;}
>>if you want to be more specific, give only that item a unique class name
>>and style it through that class name.
>>Or use inline styling.

>
> Thanks, Richard
>
> I moved the css statements from the external file into the page's
> <head> section and everything appears just fine now.
>
> I had this same problem on another page (that used a different .css
> file). Making the same kind of change fixed that one also.
>
> Doesn't make any sense but it works.
>
> Thanks again.


CSS always goes in the head unless you're using inline.

<head>
<style type="text/css">
body {}
table {}
</style>
</head>

<body>
<div style="font-weight:bold;">
text
</div>
</body>
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      05-16-2011
richard the sto0pid wrote:

> CSS always goes in the head unless you're using inline.


Or in an external file.

<head> ...
<link type="text/css" rel="stylesheet" href="../path/to/styles.css" >
</head>

--
-bts
-In a broadband world, you are just a dialup
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      05-16-2011
Beauregard T. Shagnasty wrote:
> richard the sto0pid wrote:
>
>> CSS always goes in the head unless you're using inline.

>
> Or in an external file.
>
> <head> ...
> <link type="text/css" rel="stylesheet" href="../path/to/styles.css">
> </head>
>


BEST in an external file, especially from a management perspective. As
to the OP, any advice would be a WAG without actually *seeing* what you
did. Moving the css to the head may indicate a change in the order of
the rules from the original stylesheet, a syntax error, or simply a path
problem to the stylesheet! But my crystal ball is on the fritz...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Martin
Guest
Posts: n/a
 
      05-16-2011
On Mon, 16 May 2011 15:53:24 -0400, "Jonathan N. Little"
<(E-Mail Removed)> wrote:

>Beauregard T. Shagnasty wrote:
>> richard the sto0pid wrote:
>>
>>> CSS always goes in the head unless you're using inline.

>>
>> Or in an external file.
>>
>> <head> ...
>> <link type="text/css" rel="stylesheet" href="../path/to/styles.css">
>> </head>
>>

>
>BEST in an external file, especially from a management perspective. As
>to the OP, any advice would be a WAG without actually *seeing* what you
>did. Moving the css to the head may indicate a change in the order of
>the rules from the original stylesheet, a syntax error, or simply a path
>problem to the stylesheet! But my crystal ball is on the fritz...


The external .css file contained these lines:
body {font-family:arial;font-weight:bold;}
table {font-family:arial; font-weight:bold;}
td.padded, th.padded {padding-left:1em; padding-right:1em;}
input {font-weight:bold;}

These lines were copied into the <head> section of the page in the
same place where the <link> statement was.

IOW, This:
<link type='text/css' rel='stylesheet' href='../includes/DBStyle.css'>

was replaced with:
<style type='text/css' >
body {font-family:arial;font-weight:bold;}
table {font-family:arial; font-weight:bold;}
td.padded, th.padded {padding-left:1em; padding-right:1em;}
input {font-weight:bold;}
</style>


Just for the heck of it, I just now switched it back - commented out
the <style> block and put the <link> back in (as shown above).
When I load the page into FF, the fonts are not bolded. When I look at
the error console, this message is displayed:

Error: The stylesheet http://localhost/includes/DBStyle.css was not
loaded because its MIME type, "text/html", is not "text/css"

Does the mime type need to be specified in some manner?
 
Reply With Quote
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      05-16-2011
Martin wrote:

> "Jonathan N. Little"
>> Beauregard T. Shagnasty wrote:
>>> <head> ...
>>> <link type="text/css" rel="stylesheet" href="../path/to/styles.css">
>>> </head>

>>
>> BEST in an external file, especially from a management perspective.
>> As to the OP, any advice would be a WAG without actually *seeing*
>> what you did. Moving the css to the head may indicate a change in
>> the order of the rules from the original stylesheet, a syntax error,
>> or simply a path problem to the stylesheet! But my crystal ball is
>> on the fritz...

>
> The external .css file contained these lines:
> body {font-family:arial;font-weight:bold;}
> table {font-family:arial; font-weight:bold;}
> td.padded, th.padded {padding-left:1em; padding-right:1em;}
> input {font-weight:bold;}
>
> These lines were copied into the <head> section of the page in the
> same place where the <link> statement was.
>
> IOW, This:
> <link type='text/css' rel='stylesheet' href='../includes/DBStyle.css'>
>
> was replaced with:
> <style type='text/css' >
> body {font-family:arial;font-weight:bold;}
> table {font-family:arial; font-weight:bold;}
> td.padded, th.padded {padding-left:1em; padding-right:1em;}
> input {font-weight:bold;}
> </style>
>
> Just for the heck of it, I just now switched it back - commented out
> the <style> block and put the <link> back in (as shown above). When I
> load the page into FF, the fonts are not bolded. When I look at the
> error console, this message is displayed:
>
> Error: The stylesheet http://localhost/includes/DBStyle.css was not
> loaded because its MIME type, "text/html", is not "text/css"
>
> Does the mime type need to be specified in some manner?


If we could see your page, would we find such markup as:

<table>
<tr>
<td class='padded'> supposedly bold text here </td>

You have no 'bold' setting for td.

What operating system is your localhost server on?
(DBStyle not same as dbstyle, except on Windows)

--
-bts
-Four wheels carry the body; two wheels move the soul
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      05-17-2011
Beauregard T. Shagnasty wrote:
> Martin wrote:
>


>> Error: The stylesheet http://localhost/includes/DBStyle.css was not
>> loaded because its MIME type, "text/html", is not "text/css"
>>
>> Does the mime type need to be specified in some manner?


Yes

>
> If we could see your page, would we find such markup as:
>
> <table>
> <tr>
> <td class='padded'> supposedly bold text here</td>
>
> You have no 'bold' setting for td.
>
> What operating system is your localhost server on?
> (DBStyle not same as dbstyle, except on Windows)
>


Or the css/text mime type may not be set for the extension ".css" on the
server.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      05-17-2011
16.5.2011 22:18, Beauregard T. Shagnasty kirjoitti:

> richard the sto0pid wrote:
>
>> CSS always goes in the head unless you're using inline.

>
> Or in an external file.


Or in the body. It's non-conforming and syntactically invalid (against
published DTDs) to put a <style> element inside the <body> element, but
it actually works in browsers, even backwards (i.e., the CSS rules there
are also applied to elements that precede the <style> element).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
not working: onmouseover="this.style.font-weight='bold';" Steve Richter ASP .Net 2 07-16-2007 05:20 AM
Bold Font dancer ASP .Net 7 06-27-2007 08:03 AM
Browser Settings to Correctly Display "Font-Bold" Altemir ASP .Net 0 11-08-2006 10:25 PM
font: bold query. Brian Tozer HTML 8 10-06-2003 09:18 PM



Advertisments