Solved

For cabrionet or another expert

Posted on 2000-02-13
4
158 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adding a Li to a UL after a specified Li contents 2 42
simplest php form 3 57
File download script VBSCRIPT fail on download PPT files 2 32
Centering Vertically 3 27
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…

932 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now