473,513 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Form fonts

Hi. Does anyone know how to control the fonts of a form <input type="text"> or <input type="submit">? I'd like to reduce the size of a couple form inputs. Tried surrounding them with <font size="-1">' .. </font>, but nothing happens. Any advice would be appreciated...Dennis
Jul 23 '05 #1
3 1408
Dennis Allen wrote:
Hi. Does anyone know how to control the fonts of a form <input type="text"> or <input type="submit">? I'd like to reduce the size of a couple form inputs. Tried surrounding them with <font size="-1">' .. </font>, but nothing happens. Any advice would be appreciated...Dennis


This has nothing at all to do with JavaScript, you should be trying:

comp.infosystems.www.authoring.stylesheets

but since we're here...

<style type="text/css">
input {font-size: 100%;}
.fs80 {font-size: 80%;}
</style>

The first rule will make all input text 100%. The second will make the
font of any element with class="fs80" 80% of whatever is the default.

To see the result, put above in the head and this in the body:

<form action="">
<input type="text" value="Plain style"><br>
<input type="text" value="aClass style" class="fs80">
</form>

--
Fred
Jul 23 '05 #2
On Tue, 11 Jan 2005 18:44:05 +1000, Fred Oz <oz****@iinet.net.auau> wrote:

[snip]
<style type="text/css">
input {font-size: 100%;}
.fs80 {font-size: 80%;}
</style>

The first rule will make all input text 100%. The second will make the
font of any element with class="fs80" 80% of whatever is the default.


The second sentence is inaccurate. The 80% will be calculated from the
computed value inherited from parent values. For example, consider:

body,
.normal {
font-size: 100%;
}
.bigger {
font-size: 150%;
}

<div class="normal">
<p class="normal">Normal parent, normal paragraph</p>
<p class="bigger">Normal parent, bigger paragraph</p>
</div>
<div class="bigger">
<p class="normal">Bigger parent, normal paragraph</p>
<p class="bigger">Bigger parent, bigger paragraph</p>
</div>

The BODY element will have a font size that matches the browser settings.

The first paragraph will have a font size that is the same as the parent
DIV, and that DIV will have a font size that is the same as the BODY
element (overall, the same as the default).

The second paragraph will have a font size that is 1.5 times larger than
the parent DIV, and that DIV will have a font size that is the same as the
BODY element (overall, 1.5 times larger than the default).

The third paragraph will have a font size that is the same as the parent
DIV, and that DIV will have a font size that is 1.5 times larger than the
BODY element (overall, 1.5 times larger than the default).

The fourth paragraph will have a font size that is 1.5 times larger than
the parent DIV, and that DIV will have a font size that is 1.5 times
larger than the BODY element (overall, 2.25 times larger than the default).

[snip]

Mike
Note: All of the class names displayed in this post are poor choices.
Class names should be meaningful, reflecting the purpose, rather than the
result, of applying the class.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #3
Thanks...Dennis

"Michael Winter" <M.******@blueyonder.co.invalid> wrote in message news:opskfrkrfhx13kvk@atlantis...
On Tue, 11 Jan 2005 18:44:05 +1000, Fred Oz <oz****@iinet.net.auau> wrote:

[snip]
<style type="text/css">
input {font-size: 100%;}
.fs80 {font-size: 80%;}
</style>

The first rule will make all input text 100%. The second will make the
font of any element with class="fs80" 80% of whatever is the default.


The second sentence is inaccurate. The 80% will be calculated from the
computed value inherited from parent values. For example, consider:

body,
.normal {
font-size: 100%;
}
.bigger {
font-size: 150%;
}

<div class="normal">
<p class="normal">Normal parent, normal paragraph</p>
<p class="bigger">Normal parent, bigger paragraph</p>
</div>
<div class="bigger">
<p class="normal">Bigger parent, normal paragraph</p>
<p class="bigger">Bigger parent, bigger paragraph</p>
</div>

The BODY element will have a font size that matches the browser settings.

The first paragraph will have a font size that is the same as the parent
DIV, and that DIV will have a font size that is the same as the BODY
element (overall, the same as the default).

The second paragraph will have a font size that is 1.5 times larger than
the parent DIV, and that DIV will have a font size that is the same as the
BODY element (overall, 1.5 times larger than the default).

The third paragraph will have a font size that is the same as the parent
DIV, and that DIV will have a font size that is 1.5 times larger than the
BODY element (overall, 1.5 times larger than the default).

The fourth paragraph will have a font size that is 1.5 times larger than
the parent DIV, and that DIV will have a font size that is 1.5 times
larger than the BODY element (overall, 2.25 times larger than the default).

[snip]

Mike


Note: All of the class names displayed in this post are poor choices.
Class names should be meaningful, reflecting the purpose, rather than the
result, of applying the class.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.

Jul 23 '05 #4

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

Similar topics

3
11773
by: News Central | last post by:
I resize a control in a Form wth Scale mode set to vbInches. However, the control's size changes in different screen resolution, I thought that if Scale mode is set to vbInchs, then the control...
2
5404
by: Greg Ercolano | last post by:
I'm trying to make a SELECT form that contains monospaced text where the headings and columns in the text align. Here's the HTML I've been using that seems to work on all browsers /except/...
4
11953
by: L | last post by:
Hi there, Does C# support OpenType fonts? My c# application is not recognizing OpenType fonts. Thanks, Lalasa.
6
2256
by: Marina Louki | last post by:
Hello! I have a parent and some mdi child forms. Everytime I open a form using the form.mdiparent=me , the form takes the characteristics of the parent. I want these forms to share the same menu,...
3
1633
by: DeanL | last post by:
Hi all, I've been developing an Access 97 DB on my WinXP Pro machine and have sized all forms, reports, etc. to work on a 1024 x 768 resolution screen. The problem I have is that when on of my...
1
3246
by: Atul | last post by:
Hi, I have installed a truetype font (.ttf) on a linux machne (SUSE linux 10, KDE) by copying it to my .fonts folder. I can use the font in all applications like open-office and firefox browser....
25
2445
by: Dave | last post by:
Hello. In trying to get an anchor element to stylistically match an input or button element, I find that the button and input cannot be styled according to the 2.1 CSS spec. For example, I...
18
24929
by: Diogenes | last post by:
Hi All; I, like others, have been frustrated with designing forms that look and flow the same in both IE and Firefox. They simply did not scale the same. I have discovered, to my chagrin,...
10
44057
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their...
0
7160
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
7384
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
7525
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
4746
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3233
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1594
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
799
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.