Closed Bug 441231 Opened 16 years ago Closed 16 years ago

Tabs inside <pre></pre> tags cause the text to overflow the box

Categories

(Core :: Layout: Block and Inline, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 411059

People

(Reporter: bugzilla, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9) Gecko/2008052906 Firefox/3.0

Sometimes the size of a box containing a <pre> element is not calculated correctly if the element contains tab characters. For example, if a <pre> element is inside a <div> element with a background colour and display: table and the text inside the <pre> element contains tab characters, then the text overruns the background colour.

Reproducible: Always

Steps to Reproduce:
Minimal demonstration:

<html>
<body>
<div style="background-color: red; display: table;">
<pre>
ABCD	EFGH   <!-- ABCD and EFGH are separated by a tab character -->
</pre>
</div>
</body>
</html>

Actual Results:  
The letter H appears outside the red area.

Expected Results:  
Every letter should appear inside the red area.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.