Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

For cabrionet or another expert

Posted on 2000-02-13
4
Medium Priority
?
168 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 680 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

This article discusses four methods for overlaying images in a container on a web page
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
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…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

879 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