473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

fixed width and bold

it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?
Oct 18 '08 #1
7 5184
On Sat, 18 Oct 2008 16:12:54 -0400 in
gd**********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:
it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?
Via a stylesheet?

tt {font-weight: bold} seems to work OK to me. If however you want fixed width you may
have to add in a font-family:monospace too.

Stephan
--
Stephan Bird MChem(Hons) AMRSC
st************@mad.scientist.com
Currently in Macclesfield, Cheshire
Oct 18 '08 #2
RickMerrill wrote:
it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?
I have found that one can make bold text with <tt>, but that for Courier
New the difference in darkness can be quite small, hence it might look
like the text is not bold when it actually is. One approach I tried was
to use CSS to make the preferred font Dark Courier when <tttext is
bold, and this helps a little, but of course many people will not have
the Dark Courier font.
Oct 18 '08 #3
Stephan Bird wrote:
On Sat, 18 Oct 2008 16:12:54 -0400 in
gd**********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:
>it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?

Via a stylesheet?

tt {font-weight: bold} seems to work OK to me. If however you want fixed width you may
have to add in a font-family:monospace too.

Stephan
I'll try the font-family. What I should have said I want
is to turn bold on and off within a <ttstream.

Oct 18 '08 #4
On Sat, 18 Oct 2008 16:39:02 -0400 in
gd*********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:
Stephan Bird wrote:
>On Sat, 18 Oct 2008 16:12:54 -0400 in
gd**********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:
>>it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?

Via a stylesheet?

tt {font-weight: bold} seems to work OK to me. If however you want
fixed width you may have to add in a font-family:monospace too.

Stephan

I'll try the font-family. What I should have said I want is to turn
bold on and off within a <ttstream.
How about

<tt>This text is not bold but <span style="font-weight:bold">this text
is</span>.</tt>

then?

Stephan

--
Stephan Bird MChem(Hons) AMRSC
st************@mad.scientist.comREMOVE
Currently in Macclesfield, Cheshire
Oct 18 '08 #5
Stephan Bird wrote:
On Sat, 18 Oct 2008 16:39:02 -0400 in
gd*********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:
>Stephan Bird wrote:
>>On Sat, 18 Oct 2008 16:12:54 -0400 in
gd**********@registered.motzarella.org, RickMerrill
<Ri***********@gmail.NOSPAM.comwrote:

it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?
Via a stylesheet?

tt {font-weight: bold} seems to work OK to me. If however you want
fixed width you may have to add in a font-family:monospace too.

Stephan
I'll try the font-family. What I should have said I want is to turn
bold on and off within a <ttstream.

How about

<tt>This text is not bold but <span style="font-weight:bold">this text
is</span>.</tt>

then?

Stephan
The style solution worked fine with the font-family (true bold, not just
fattened letters) and I like using CSS.

Oct 18 '08 #6
RickMerrill wrote:
it appears that <ttwill not do <b>
although it will do <u>.

IS there any way to do bold with a fixed width?

New documents should be created with a Strict Doctype and therein Font
Markups (TT | I | B | BIG | SMALL) are not deprecated, but discouraged
in favor of style sheets, whereas (U) is deprecated and CSS should be
used instead. Do not use those tags, use others and apply to them what
Stephan gave.

--
Gus

Oct 19 '08 #7
RickMerrill wrote:
What I should have said I want
is to turn bold on and off within a <ttstream.
What you should have said is the URL of your attempt.

Your initial description "it appears that <ttwill not do <balthough it
will do <u>" makes no sense. To begin with, tags don't do anything. They are
data. Data does not do anything, except in Star Treck.

What you probably meant to say is that you have a <tt>...</ttelement and
inside it you tried to use a <b>...</belement, and you expected - quite
reasonably - browsers to render the content of the latter in bold. If you
had posted a URL and specified the browser you used, we could have
immediately looked at the situation and would probably have observed that
the text _is_ in bold but is not well distinguishable from non-bold text (as
suggested in one reply in this thread).

The situation is relatively simple, so in _this_ case we can probably
reconstruct what happened. (But you would have got help faster and more
reliably if you had just posted the URL.) On IE 7 for example, factory
settings imply that for
<tt>foo <b>foo</b></tt>
the foo words look pretty much the same, although the latter is _slightly_
bolder. You can see this if you use the zooming function of the browser,
e.g. zooming with 200%.

This isn't really an HTML problem, and even though you could play with
presentational HTML markup to change font size or font face, that's really
clumsy and coarse. In HTML, you can select between 7 font sizes without even
knowing what they are (except via experimentation that tells you about some
assumed default behavior of those browsers that you care to test on).

But here's what I'd suggest for your style sheet:
tt { font-family: Consolas; font-size: 100%; }
The essential part is setting font-size to 100%, since by default most
browsers use reduced (about 90%) font size for <tt>. In 100% size, bolding
of monospace text tends to be visually more apparent. Setting font face to
Consolas just makes things prettier on computers that have this nice font
(which is especially suitable if you use other "Vista C fonts" like Cambria
or Calibri for copy text).

Note: If you intend to use <spanmarkup as some people have suggested,
check the usual CSS Caveats first. Using <spanis by definition meaningless
in HTML terms - it is semantically empty markup, whereas <bsays 'bold
face' and <strongsays 'strong emphasis'. If you want to bold e.g. keywords
in program source code, then I'd vote for <b>, since it's really not a
matter of emphasis but conventional presentation aimed at improving
readability.

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

Oct 19 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: John F Dutcher | last post by:
I use code like the following to retrieve fields from a form: recd = recd.append(string.ljust(form.getfirst("lname",' '),15)) recd.append(string.ljust(form.getfirst("fname",' '),15)) etc.,...
2
by: TPSreport | last post by:
ASP.NET 2003. Two DataGrids, six columns each, one grid atop the other. I need to have the columns line up, i.e., DataGrid1 Col(1) lined up w/ DataGrid2 Col(1) - each the same width on the...
179
by: SoloCDM | last post by:
How do I keep my entire web page at a fixed width? ********************************************************************* Signed, SoloCDM
3
by: Doug McCrae | last post by:
http://www.btinternet.com/~doug.mccrae/go4learning/index.html As it says in the subject, a two column layout (plus header and footer boxes). I feel the left column really needs to be fixed width...
0
by: VRandy | last post by:
Example: http://pages.prodigy.net/randyv/centerprb.htm The desired effect is a fixed width left margin with a fixed width div centered in the right side. If the browser is resized to become very...
28
by: Gabriel | last post by:
greetings, I want to achieve the following effect : Menu1 | Menu2 | Menu3 | Menu4 | Menu5 | I played with padding, border-width and the like and it's ok for the | . My problem is that...
12
by: JB | last post by:
Hi All, Is it acceptable to use a fixed width vertical navigation column within a fluid 2 or 3 column layout? Example. Left Column (navigation) fixed width of say 180px Right Column (main...
31
by: Sarita | last post by:
Hello, this might sound stupid, but I got a really nice homepage template which unfortunately is a 3-Column Fixed Width CSS format. Now I don't have any content for the right column and would...
4
by: Jeff | last post by:
Hey I'm wondering how the Fixed-Width Text Format is What I know is that the top line in this text format will contain column names. and each row beneath the top line represent for example a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.