Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Changing the font size of an input text box

Posted on 2012-03-14
6
Medium Priority
?
350 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 53

Assisted Solution

by:COBOLdinosaur
COBOLdinosaur earned 2000 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 2000 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The first step to building an amazing About page is to figure out what you want the page to say about your company. You then must grab the attention of the reader, boast a bit, tell a story and let others brag about you. With a little bit of thought…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

810 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