Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Changing the font size of an input text box

Posted on 2012-03-14
6
Medium Priority
?
346 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Technology Partners: 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!

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

636 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