Netscape positioning problems

  • Thread starter Thread starter Sergey Poberezovskiy
  • Start date Start date
S

Sergey Poberezovskiy

Hi,

Can anyone tell me how do I position controls within
Netscape without using tables? Consider the following:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML>
<HEAD>
<style>
.myDiv { display:inline; width:100px; }
</style>
</HEAD>
<body>
<table>
<tr>
<td><div class="myDiv">Text:</div>
<input size="40" type="text"></td>
</tr>
<tr>
<td>Something else</td>
</tr>
<tr>
<td>
<div class="myDiv">Another Text:</div>
<input size="40" type="text">
</td>
</tr>
<tr>
<td>Finish table</td>
</tr>
</table>
</body>
</HTML>

My textBoxes are perfectly aligned in IE, but under
Netscape width attribute is just ingored.

Any help is much appreciated.
 
Quoted from design notes for "width" property in CSS:

Note in Netscape 4.0+:

This property does not work (properly) with inline elements, form
fields, images, and definition lists

You see that inline elements is not supported ,so you should probably use
the "table" solution.
 
To get netscape to recognise the width, apply css width to the textboxes
themselves, too. So if your textboxes were class="myDiv", they'd be 100px
wide.

-John
 
I think what the origional poster wants is something like to place tabstops
after the "field labels".
 
Aha - gotcha! I'll have to put my reading glasses on and my brain in, next
time. ;p

-John
 
Back
Top