473,403 Members | 2,222 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,403 software developers and data experts.

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

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
4 1826
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: James Stroud | last post by:
Hello All, I would like for a tkinter text widget to be aware of how big the frame that contains it is, then I would like for it to reset its width to the appropriate number of characters when...
4
by: Daniele petracca | last post by:
<SCRIPT TYPE="text/javascript"> if (screen.width==1024) { distanza=100; sinistra=100; } else { distanza=10; sinistra=10; } document.write(screen.width);
1
by: al | last post by:
Greetings, How should I adjust my text size on my 21(inch) screen so it looks nicely fit on client's 17(inch), all are with IE 6? I use 'Larger' text size but it appears large on client's and...
9
by: C R | last post by:
I have a label inside of a form. The form is maximized to fill the entire screen. I would like the label to take up 40% of the width of the screen, and 70% of the height, regardless of monitor size...
14
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
7
by: Tim Rogers | last post by:
Hi folks, this is a resolution-detect script that I used on a site. As you can see it is designed to detect when the screen resolution falls below a certain level then load an alternative style...
7
by: Simon Wigzell | last post by:
I am putting together a website for a photographer. There will be a section where his clients can select various sizes of picture to order. I would to be able to display the images the actual size...
0
by: benfly08 | last post by:
Hi, guys. I'm developing a web application for Sales Department people in my company. I used my 1024X768 resolution and "Medium" IE text size to test my Layout and it worked fine. However, some...
21
by: Cartoper | last post by:
I am working on a browser kiosk needs to be able to be run at multiple screen resolutions. What I would like to do is keep the text the same size relative to the screen, all the time. In other...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.