Solved

Changing the font size of an input text box

Posted on 2012-03-14
6
301 Views
Last Modified: 2012-06-27
Hello Experts,

I have the following html/css:

<html><head>
<style>
input[type="text"] {
	font: 11px "Helvetica Neue", Helvetica, Arial, sans-serif;
	border: 1px solid #444;
	}
</style>
</head>
<body>
<input type="text" />
</BODY></HTML>

Open in new window



However, it is ignoring the font size.
How can I get it to use the font size?

Thanks
0
Comment
Question by:jagku
  • 4
  • 2
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37721693
try using the more specific declaration font-size:11px;

Some times aggregated properties are not fully applied.


Cd&
0
 

Author Comment

by:jagku
ID: 37721723
Hi,

No - I tried this earlier and it was ignored.

i.e.
<html><head>
<style>
input[type="text"] {
	font-size: 11px;
	FONT-FAMILY: "Helvetica Neue", Helvetica, Arial, sans-serif;
	border: 1px solid #444;
	}
</style>
</head>
<body>
<input type="text" />
</BODY></HTML>

Open in new window


Thanks
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 37721753
Which browser are you using?


Cd&
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 500 total points
ID: 37721789
If you are using IE you will have to change the rule because IE does not know what the square brackets mean and will ignore [type="text"]


You will need to use an id or class


Cd&
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 37721818
I just ran across some documentation that might help.  It may work for IE if you use a valid DOCTYPE

Try
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Open in new window



Cd&
0
 

Author Closing Comment

by:jagku
ID: 37721948
Many Thanks!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now