Closed Bug 225503 Opened 21 years ago Closed 21 years ago

Span Contents collapse into previous Span Element when empty

Categories

(Core :: DOM: CSS Object Model, defect)

x86
Windows 2000
defect
Not set
trivial

Tracking

()

RESOLVED DUPLICATE of bug 81710

People

(Reporter: keith, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 I have two span statements assigned content via a database function, sometimes the database gives back empty data for a field. Both of these span elements are set to float:right;with:25%, when the first element has no value the second elements contents appear where the first element should be. Reproducible: Always Steps to Reproduce: 1. Create a div tag 2. create a span tag, assign style attribute "float:right;width:25% create a closing span tag 3. duplicate step but this time place some text between the second span tag and close it 4. enter some text before closeing the div tag Actual Results: the second spans contents appear exactly where the first span should be taking up 25% of the alloted area. Expected Results: Mozilla should have left and open space instead accounting for 25% of the avaliable space. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <div><span style="float:right;width:25%"></span><span style="float:right;width:25%">desc</span>d</div> <div><span style="float:right;width:25%;">2004</span><span style="float:right;width:25%;">desc</span>d</div> </body> </html>
Give your spans explicit height (or min-height) to work around this bug. *** This bug has been marked as a duplicate of 81710 ***
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: