Solved

For cabrionet or another expert

Posted on 2000-02-13
4
165 Views
Last Modified: 2010-04-09
I previously asked:

I have got an input field and a drop down box on my page (please see below). However, the default sizes of both are a bit to large.
My question: how can I make the input field and drop down box look smaller (less pixels high and wide) in Netscape and Internet Explorer?

Cabrionet.. your solution works in Internet Explorer, but not in Netscape:


 <html>
 <head>
 <title>Untitled Document</title>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <style type="text/css">
<!--
  ..test {  font-family: Arial; font-size: 9pt; font-style: normal; font-weight: normal; font-variant: normal; text-decoration: none; }
                   -->
  </style></head>



                   <body bgcolor="#FFFFFF">
                   <span class="test"></span>
                   <FORM class="test">

                     <SELECT id=select1 name=select1 class="test">
                       <OPTION selected value="">SMALL LINK</OPTION>
                   <OPTION value="">SMALL LINK</OPTION>
                   <OPTION value="">SMALL LINK</OPTION>
                   <OPTION value="">SMALL LINK</OPTION>
                   <OPTION value="">SMALL LINK</OPTION>
                   <OPTION value="">SMALL LINK</OPTION>
                   </SELECT>

                    <INPUT type="text" class="test">

                    </FORM>

                   </body>
                   </html>

 If you want smaller size... now you have size 9 (font-size: 9pt;). Put in the number 8...

In Netscape the size of the drop down box and field don't change (in IE it works fine). Hope someone can help me make this work in Netscape as well.



0
Comment
Question by:oud
[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
  • 2
4 Comments
 
LVL 8

Expert Comment

by:jbirk
ID: 2517639
Have you tried removing some of the options in the class?  Try using just these:
font-family: Arial; font-size: 9pt; font-style: normal;

Also try just using the style property of the form elements instead of defining a class...  not sure if that's causing a problem, but it may help.  Like this:

<INPUT type="text" style="font-family: Arial; font-size: 9pt; font-style: normal;" size=10>

-Josh
0
 
LVL 1

Accepted Solution

by:
cabrionet earned 170 total points
ID: 2517980
Hi

I have added imput and submit form. Just paste this code. Tested with IE 4 and NS 4...

Good luck;

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--

..test2 {  font-family: Arial, Helvetica, sans-serif; font-size: 9px; font-style: normal; line-height: normal; font-weight: normal; font-variant: normal; text-transform: none; text-decoration: none}
-->
</style></head>
<body bgcolor="#FFFFFF"  class="test2">
<FORM>
  <p>
    <SELECT id=select1 name=select1 class="test2">
      <OPTION selected value="">SMALL LINK</OPTION>
      <OPTION value="">SMALL LINK</OPTION>
      <OPTION value="">SMALL LINK</OPTION>
      <OPTION value="">SMALL LINK</OPTION>
      <OPTION value="">SMALL LINK</OPTION>
      <OPTION value="">SMALL LINK</OPTION>
    </SELECT>
  </p>
  <p>&nbsp;</p>
  <p>
    <input type="text" name="textfield" class="test2">
    <br>
    <br>
    <br>
    <input type="submit" name="Submit" value="Submit" class="test2">
  </p>
</FORM>

</body>
</html>
0
 
LVL 1

Expert Comment

by:cabrionet
ID: 2518007
I dont know why but the server added 2 dots! again! in the style tag ( in front of the    test2 {  font-family...)

Erase 1

And it will work.

0
 

Author Comment

by:oud
ID: 2520863
Thanks cabrionet, your code works fine now in both versions.

jbirk: I used the style property of the form elements and this also worked. Also I deleted the default options in the class and this didn't cause any problems. So you answer was very helpful as well.
I have posted a "For jbirk".

Thanks again to you both.
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
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.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

635 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