Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Style sheet is messing up my html page

    I have a simple page composed of an html form, one table with one row. This row contains a couple of input boxes.

    In Netscape 4.77, the input boxes appear longer than what they should be, even though I'm specifying the size and maxlenght.
    By process of elimination, I was able to narrow down the problem to the <style> tag which specifies the font-family to be arial on all th and td tags.

    Any idea why the style tag is causing a problem on N 4.77? It's ok in I.E.

    Here's the code. You can save that onto a file on your local drive and remove the style section and you'll see that the input boxes shrink to the correct size.

    <html>
    <head>
    <title>Broker Trade Entry</title>

    <style type="text/css">
    <!--
    th, td {font-family: arial}
    -->
    </style>

    </head>

    <body bgcolor=#FFFFEF>
    <center>

    <form method=post name="TradeTicket_form" action="TradeTicket.csh" target=TradeTicketMain>
    <br><br>

    <table align=center width=600 bgcolor=green border=1 cellpadding=0 cellspacing=0>

    <tr>

    <th align=center nowrap>
    <font color=white size=2>Cusip </font><input type=text name=cusip size=10 maxlength=9>
    </th>

    <th align=center nowrap>
    <font color=white size=2>T/D </font><input type=text name=trade_date value="12/10/2002" size=10 maxlength=10>
    </th>

    <th align=center nowrap>
    <font color=white size=2>WI </font>
    <select size=1 name=wi>
    <option value=-1 selected>No</option>
    <option value=0>WI</option>
    <option value=1>WI+1</option>
    <option value=2>WI+2</option>
    <option value=3>WI+3</option>
    <option value=4>WI+4</option>
    <option value=5>WI+5</option>
    <option value=6>WI+6</option>
    <option value=7>WI+7</option>
    <option value=8>WI+8</option>
    <option value=9>WI+9</option>
    </select>
    </th>

    <th align=center nowrap>
    <font color=white size=2>S/D </font><input type=text name=settle_date value="12/13/2002" size=10 maxlength=10>
    </th>

    <th align=center nowrap>
    <font color=white size=2>Situation </font><input type=checkbox name=situation>
    </th>

    <th align=center nowrap>
    <font color=white size=2>BW </font><input type=checkbox name=bw>
    </th>

    </tr>

    </table>

    </form>
    </center>
    </body>
    </html>

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    css is not uniform cross-browser....sorry.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    Regular Coder bacterozoid's Avatar
    Join Date
    Jun 2002
    Location
    USA
    Posts
    490
    Thanks
    24
    Thanked 35 Times in 35 Posts
    Originally posted by zoobie
    css is not uniform cross-browser....sorry.
    What is? Lol, I would doubt if there was one language that all browsers, or even just the major ones, that supported any one language exactly the same way. Darn that Netscape, never liked it, lol. It doesn't display my pages right...but that's just personal opinion. I say design for IE, make compatible with NS, screw the rest.

  • #4
    New Coder
    Join Date
    Jul 2002
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I figured out the problem.

    Thank you all.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •