widths are not created correctly when assigned a percentage

RESOLVED INVALID

Status

()

Core
DOM: CSS Object Model
--
major
RESOLVED INVALID
15 years ago
15 years ago

People

(Reporter: Graeme McCaffery, Assigned: jst)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
browser is moz 1.1 gecko 20020826

included sample code that have a form consisting of a label and an input. the
label should be 35% of the parent div and the input 60% (they are span
elements). mozilla resizes the span items to the width of the input or label
string and ignores the percentage.IE 5 and 5.5 display the correct behaviour.
----------------------cut here ------------------------
<html>

<head>
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">

<style>

body 
{
color: inherit;
font-style: normal;
font-family: Verdana,Arial,Helvetica, sans-serif;

}

div.centrebox
{
background-color: #E5EFFA;
border: 1px groove  #0000FF;
text-align: center;
width: 500px;
height: auto; 
overflow: visible;
position: absolute;
top: 200px;
left: 200px
}

span.label
{
margin: 10px 1px 1px 1px;
width: 35%;
font-size: 8pt;
text-align: right;
vertical-align: middle;
white-space: normal;
overflow: hidden;  
border: 1px groove  #0000FF;
}

span.formw 
{   
margin: 10px 1px 1px 1px;
padding: 1px 0px 1px 10px;
width: 60%;
white-space: normal;
text-align: left;
overflow: hidden;
border: 1px groove  #0000FF;
} 



#button
{
background-color: #0000FF;
margin: 1px 1px 1px 1px;
 font-size: 7pt;
 font-weight: bold;
 background-color: #0000DD;
 color: #ffffff;
}

</style>
  
<title>Password </title>
</head>


<body>
<div class="centrebox" >


<form name="Login" method="POST">

<span class='label'>username</span>
<span class="formw">
<input type="text" name="USER" size="30" >
</span>
<br />
<span class='label'>password</span>
<span class="formw">
<input type="password" name="PASSWORD" size="30" >
</span>
<br />


</form>

</div>


</body>
</html>
(Reporter)

Comment 1

15 years ago
Created attachment 100242 [details]
shows the width error

this is indended to be an enter password page
<span> has display:inline, hence the "width" property does not apply to it (see
http://www.w3.org/TR/REC-CSS2/visudet.html#the-width-property).  This is a known
bug in IE/Windows that may even be fixed in the IE6 "CSS1Compat" mode.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.