Solved

For cabrionet or another expert

Posted on 2000-02-13
4
163 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 May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Suggested Solutions

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

734 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