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
Solved

Changing the font size of an input text box

Posted on 2012-03-14
6
318 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
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

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

Suggested Solutions

Title # Comments Views Activity
Background video not displaying in Internet Explorer. 3 37
multiple selects 23 49
100% tall div not scrollable on iPhone 3 20
Set time on Session (ASP) 14 23
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

829 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