By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,958 Members | 1,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,958 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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.

"UJ" <fr**@nowhere.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
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.

Nov 19 '05 #2

P: n/a
Take a look at the font-size attribute on the MSDN. It has samples on how to
change the font-size in javascript:
http://msdn.microsoft.com/library/de...s/fontsize.asp

HTH
--
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"UJ" wrote:
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.

"UJ" <fr**@nowhere.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
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.


Nov 19 '05 #3

P: n/a
UJ
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>


"Phillip Williams" <Ph**************@webswapp.com> wrote in message
news:AE**********************************@microsof t.com...
Take a look at the font-size attribute on the MSDN. It has samples on how
to
change the font-size in javascript:
http://msdn.microsoft.com/library/de...s/fontsize.asp

HTH
--
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"UJ" wrote:
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.

"UJ" <fr**@nowhere.com> wrote in message
news:e3**************@tk2msftngp13.phx.gbl...
>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.
>
>


Nov 19 '05 #4

P: n/a
UJ wrote:
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

Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.