Solved

For cabrionet or another expert

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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.
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…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

744 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

13 Experts available now in Live!

Get 1:1 Help Now