473,803 Members | 2,909 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setting textarea font to match rest

I haven't specified fonts, leaving the user to have their chosen font.

However, different tags render in different default fonts: text, input,
& textarea all different from one another. I guess this is normal
behaviour, but it looks poor, and I don't want our website to look that
way (to out of the box browsers).

How would I set textarea's 'like' input, or how would I determine
(Javascript?) what's being used by an input field, to set the textarea
the same ? If it's got to be javascript, is there a way to set style for
all textareas together, rather than individual textareas ?

The difference between input boxes & text is bearable, if necessary, but
the textarea default font stands out too much.

Thanks,
Chris
Jul 20 '05 #1
4 23733
Els
Chris Sharman wrote:
I haven't specified fonts, leaving the user to have their
chosen font.

However, different tags render in different default fonts:
text, input, & textarea all different from one another. I
guess this is normal behaviour, but it looks poor, and I
don't want our website to look that way (to out of the box
browsers).

How would I set textarea's 'like' input, or how would I
determine (Javascript?) what's being used by an input
field, to set the textarea the same ? If it's got to be
javascript, is there a way to set style for all textareas
together, rather than individual textareas ?

The difference between input boxes & text is bearable, if
necessary, but the textarea default font stands out too
much.


Didn't try this, but how about
body,input,text area{
font-family:Helvetic a,sans-serif;
font-size:100%;
}
?

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Jay-Z - Excuse Me Miss feat Pharrell
Jul 20 '05 #2
Els wrote:
Chris Sharman wrote:
However, different tags render in different default fonts:
text, input, & textarea all different from one another. I
guess this is normal behaviour, but it looks poor, and I
don't want our website to look that way (to out of the box
browsers).

How would I set textarea's 'like' input, or how would I
determine (Javascript?) what's being used by an input
field, to set the textarea the same ? If it's got to be
javascript, is there a way to set style for all textareas
together, rather than individual textareas ?


Didn't try this, but how about
body,input,text area{
font-family:Helvetic a,sans-serif;
font-size:100%;
}

Sorry - I wasn't clear - I don't want to overrule all users' font
choices - I want to leave body alone, and have textarea 'like' body, and
maybe input & select too.

Sort of textarea { font-family: inherit }
hmm - just tried that - answered my own question - sorry for wasting
everybody's time !!

Chris
Jul 20 '05 #3
Els
Chris Sharman wrote:
Els wrote:
Chris Sharman wrote:
However, different tags render in different default fonts:
text, input, & textarea all different from one another. I
guess this is normal behaviour, but it looks poor, and I
don't want our website to look that way (to out of the box
browsers).

How would I set textarea's 'like' input, or how would I
determine (Javascript?) what's being used by an input
field, to set the textarea the same ? If it's got to be
javascript , is there a way to set style for all textareas
together, rather than individual textareas ?
Didn't try this, but how about
body,input,text area{
font-family:Helvetic a,sans-serif;
font-size:100%;
}


Sorry - I wasn't clear -


Yes you were
I don't want to overrule all
users' font choices - I want to leave body alone, and have
textarea 'like' body, and maybe input & select too.
I did get that, just didn't think of a solution without having
to use at least a generic font... (don't know why I put the
Helvetica in :S)
Sort of textarea { font-family: inherit }
hmm - just tried that - answered my own question - sorry
for wasting everybody's time !!


Didn't waste it, you provided other people (like myself) with
a solution to future problems :-)

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Legião Urbana - HIGH NOON
Jul 20 '05 #4
Chris Sharman wrote:
Els wrote:
Chris Sharman wrote:
However, different tags render in different default fonts:
text, input, & textarea all different from one another. I
guess this is normal behaviour, but it looks poor, and I
don't want our website to look that way (to out of the box
browsers).
How would I set textarea's 'like' input, or how would I
determine (Javascript?) what's being used by an input
field, to set the textarea the same ? If it's got to be
javascript, is there a way to set style for all textareas
together, rather than individual textareas ?


Didn't try this, but how about body,input,text area{
font-family:Helvetic a,sans-serif;
font-size:100%;
}

Sorry - I wasn't clear - I don't want to overrule all users' font
choices - I want to leave body alone, and have textarea 'like' body, and
maybe input & select too.

Sort of textarea { font-family: inherit }
hmm - just tried that - answered my own question - sorry for wasting
everybody's time !!


Spoke too soon - doesn't work in IE. Fixes Mozilla though.

Chris
Jul 20 '05 #5

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

Similar topics

1
4069
by: Thomas S. | last post by:
Hello I´ve got a question concerning the usage of a textarea in a xsl. When i just write the following code, <span style="font-size:12.0pt; "><textarea name="hotelbeschreibung" rows="5" cols="35"></textarea> </span> The textarea is filled up with the complete rest of the xsl code. When I put in a sign like this - everything works and the sign is shown in the textarea.
4
16725
by: Csaba Gabor | last post by:
What I'd like to do is to be able to set the font of a textarea element to the same font that another element is using (say, for example, an <INPUT type=text ...> element, but if that's a no go, then a generic element's font will do OK, too. What's the correct way to do this, please (so that it will also work for IE 6)? The motivation for this is that I have some text on the screen and I want to insert a textarea element between the...
1
3578
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
8
4257
by: yerk5 | last post by:
Does js have some way of doing what I want here: I want to paste a multiline block of text into a TEXTAREA form field, and there is data in the block of text that I want to extract into a variable. It's always going to be as the same column and row position of the block of text. For example, I want to extract the text from the block from say Line 3, column 4 through Line 3, column 15 into a variable.
21
3993
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does nothing in IE. I'd be greatful for any assistance. Also, if I will have problems the code on Opera or Safari, I'd appreciate any pointers--I don't have a Mac to test Safari. THanks very much, Michael
5
24116
by: Porthos | last post by:
I'm authoring an XML document and using the <pre> html tag for the portions that are not dynamically generated. The <pre> text is displaying in a smaller font size (and I believe different font) than standard text. I would like all of my text to be formatted this way, though I don't want to use the <pre> tag for all of it. Can anyone tell me what font and size are used by default for the <pre> tag? I don't want to change it's...
14
4033
by: Roger Withnell | last post by:
How to I find out what size text the browser is set to? Thanks in anticipation.
2
3088
by: thuythu | last post by:
Please help me.... I used and Javascript to view the data. But when i click button open a popup windows, then select data and click save button. The popup close and return the main page, but the textbox value in the main page is undefined ---------------------------------------- here are code main page: ------------------------------------------- <script language="JavaScript"> var thedata; var newwin; var thenumber; function...
0
2289
by: saijin | last post by:
I'm planning to call a list of data from an XML file but when I duplicate the content inside the <data></data> it is not showing anything Here's the ActionScript 3.0 import fl.controls.ComboBox; import fl.controls.TextArea; import fl.containers.UILoader;
0
9699
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10309
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10289
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10068
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6840
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4274
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 we have to send another system
2
3795
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.