Closed Bug 291769 Opened 20 years ago Closed 20 years ago

Border and background drawn below following text on inline element

Categories

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

x86
Linux
defect
Not set
minor

Tracking

()

RESOLVED INVALID

People

(Reporter: rowanjl, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050323 Firefox/1.0.2 Fedora/1.0.2-1.3.1

Border and background drawn below following text on inline element but the text
before the inline element are drawn below.

I would expect the inline element to be drawn ontop of the text. There is a
simple workaround, by using position : relative; you can force the inline
element to be drawn above the parent elements content.

Reproducible: Always

Steps to Reproduce:
View this HTML file for an example of the bug:

<html>
	<head>
		<title>Border Beneath Text</title>
		<style type="text/css">
			body {
				margin : 40px;
			}
			
			p {
				border : 1px solid black;
				line-height : 180%;
				padding : 10px 20px;
				text-align : justify;
				width : 300px;
			}
			
			code {
				background : white;
				border : 1px solid black;
				display : inline;
				padding : 2em;
			}
		</style>
	</head>
	<body>
		<p class="text">
			This is some text that represents the body of text on some website you will
never have to look at, be thankful <code>because I can</code> tell you, that
website is amazingly ugly and makes goatse pale in comparison. If however you
don't mind bracing yourself I'm sure we can come to some solution that doesn't
involve slamming your eyes and brain between two cement blocks.
		</p>
	</body>
</html>
Keywords: testcase
> I would expect the inline element to be drawn ontop of the text.

Why?  Please see http://www.w3.org/TR/CSS21/zindex.html#q2 (you want step 6
here, I believe).

The rendering is correct.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: