Make text the same size regardless of the screen resolution....

U

UJ

I have a client who wants me to make a web page with a marquee on it. No
problem.

They want the text to be easily changeable. No problem.

They want it so that the text will appear about the same size regardless of
the screen resolution. Now that's my problem.

In a sense, they want it so that if the screen is 800x600 and the text would
be 1" tall, and then they make the screen 1600*1200, they still want the
text to be 1" tall.

Any suggestions?

TIA - J.
 
U

UJ

Further information on this: I need to be able to do this through straight
HTML not through ASP.Net (I create an HTML page that then get's downloaded
to a remote machine that displays the HTML file.)

I've already figured out what I want to do for this section is put in a
<font size= ></font> and make the size dependent on screen size.

I just don't know javascript well enough to be able to figure out how to
call a javascript routine to have it return the appropriate size value.

TIA - J.
 
D

Damien

UJ said:
Phillip,
Thanks for the help but this does stuff the change on an event. I need to
set the font initially depending on the size of the screen. It will never
need to change again. I've written some pseudo code here (remember I don't
know what I'm doing here so I'm just sort of guessing....):

<SCRIPT language="javascript">

function SetFontSize()
{
x = screen.width;
y = screen.height;
fontsize = 14;

if (x < 1024) {
fontsize=14;
}
else
{
fontsize=20;
}

var FontSizeDiv;
FontSizeDiv = getElementByID("FontSizeDiv");
FontSizeDiv.Style.Font.Size = fontsize;
}

</SCRIPT>


<body onload="SetFontSize()">
<div id="FontSize"><font size="12">This is the stuff that will need to
be resized.</font>
</body>
I think maybe you'll want to apply a style to the div - e.g. <div
style="font-size: 1in">This is the stuff that will need to be
resized</div>

No javascript, no asp. Pure HTML (and CSS)

Damien
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top