How to disable changing fonts?

B

bim_bom

Hi,
I have a HTML file with text with different font sizes, colors, etc. - just
a normal html file.

Is there a way to add some code at the beginnng of the file, that all the
later texts are shown in the same size?

For example I have code:
<h1>AAA</h1>
<h2>BBB</h2>
<font size=20>CCC</font>

Will it be able to change,that all these texts show in the same size in IE
6?

Thanks in advance!
 
B

bim_bom

U¿ytkownik "bim_bom said:
Hi,
I have a HTML file with text with different font sizes, colors, etc. -
just a normal html file.

Is there a way to add some code at the beginnng of the file, that all the
later texts are shown in the same size?

For example I have code:
<h1>AAA</h1>
<h2>BBB</h2>
<font size=20>CCC</font>

Will it be able to change,that all these texts show in the same size in IE
6?

I created something like this:

<STYLE TYPE="text/css">

H1 { font-size: 12px }
H2 { font-size: 12px }
H3 { font-size: 12px }

FONT { font-size:12px;}

</STYLE>

It works quite well :)
 
S

Sally Thompson

I created something like this:

<STYLE TYPE="text/css">

H1 { font-size: 12px }
H2 { font-size: 12px }
H3 { font-size: 12px }

FONT { font-size:12px;}

</STYLE>

It works quite well :)


I'm not sure why you would want h1, h2 and h3 all the same size. Don't you
want to differentiate between them? Even so, better to use percent for font
sizes than px; that way your font size will change in proportion to the font
size chosen by the user, whatever the browser.
If you *do* want them the same, this would be better:

<style type="text/css">
body {font-size: 100%;}
h1, h2, h3 {font-size: 120%} (flavour to suit)
</style>

or for example:
<style type="text/css">
body {font-size: 100%;}
h1 {font-size: 140%;}
h2 {font-size: 130%;}
h3 {font-size: 120%;}
</style>
 
J

Jukka K. Korpela

The correct answer is "No".

(A longer version: "No, there isn't, but can do quite some damage trying to
do it.")
H1 { font-size: 12px } - -
It works quite well :)

For some odd values of "works" and "well".

It makes viewing the page difficult to those of users who find your text
size too small but have not yet learned how to override such settings. Of
course, most of them will be just mildly inconvenienced and go elsewhere.
(Those users who cannot read 12px text at all have naturally found a way to
defeat authors' attempts to force such sizes.)
 
N

Neredbojias

I created something like this:

<STYLE TYPE="text/css">

H1 { font-size: 12px }
H2 { font-size: 12px }
H3 { font-size: 12px }

FONT { font-size:12px;}

</STYLE>

It works quite well :)

Sounds like you have a flawed design. It may look good to you,
aesthetically speaking, but vomit can look like modern art, too.
 
A

Andy Dingley

bim_bom said:
I have a HTML file with text with different font sizes, colors, etc. - just
a normal html file.

That's not a "normal" HTML file. That's an obsolete HTML file, coded
according to 10 year old practice. A better approach would be to set
these font settings etc. through CSS - this can give you global control
of a site from one place, and also much better and easier control of
presentation settings.

Is there a way to add some code at the beginnng of the file, that all the
later texts are shown in the same size?

Yes, you can add some CSS. The rendering rules are that a presentation
setting expressed in CSS over-rides one expressed in HTML. This is
doubly good - you can ignore the <font> etc. by setting the CSS, and
you can also start refactoring your site and moving your presentation
control to CSS.

This appears to be what you're achieving already. Couple of comments
I'd make though:

* Place the CSS in an external stylesheet, shared by all pages, rather
than on each page.

* Don't use pixels for text sizing (an old FAQ - just search the
group)

* Don't make all the headers the same size - otherwise how can you
tell them apart?

* Look at the "Default CSS stylesheet" that's an appendix to either
the CSS or the HTML spec on the W3C site. That suggests good defautl
CSS settings to use for header sizes.
 

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

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top