Closed Bug 305450 Opened 19 years ago Closed 19 years ago

the <hr/> line appears shifted on the right without any reason

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 246179

People

(Reporter: olaf.marzocchi, Unassigned)

References

()

Details

(Keywords: testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050718 Camino/0.9a2
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050718 Camino/0.9a2

In the page there is a div cointaining some text, and a floating box (<div>) on
the left that covers part of it. The HR appears too much on the right: it should
be centered in the available space *inside* the text box, instead it seems to be
centered on the space *on the right* of the floating box.
Note: the problem appears when the hr is on the right of the float: if the hr is
(in the text box) under the float, is ok.

The <hr/> in the css:

hr {
	width: 15em;
	height: 1px;
	border: 0;
	margin-top: 1em;
}

The box that contains the text:

div.mainArticle {
	margin-left: auto;
	margin-right: auto;
	padding-left: 1em;
	padding-right: 1em;
	min-width: 18em;
	max-width: 40em;
}

The floating box:

div.sidebar {
	float: left;
	width: 12.5em;
	border: 1px solid #666;
	padding-left: 0.25em;
	padding-right: 0.25em;
	margin-top: 1.5em;
	margin-bottom: 0.8em;
	margin-left: 0.5em;
	margin-right: 1em;

}

The XHTML is the following:

<div class="sidebar"> something </div>
<div class="mainArticle"> <p>text ...</p> <hr/> <p>.... </div>


I tested the page with Safari and it renders the <hr/> correctly: it is put in
the middle of the space available on the right of the float AND inside the text
box, Opera (sigh) centers it in the text box, ignoring the float :-/

No workaround found.

Reproducible: Always

Steps to Reproduce:
1. write the code supplied
2. check with camino of firefox
3.

Actual Results:  
the problem described

Expected Results:  
hr centered in the space available **in the text box** on the right of the
floating box
Duplicate of/related to (bug 273145 ->) bug 244932 and/or bug 246179?
Attached file reduced testcase
A float:left div, and a div with a hr.
I added height to the divs and margin to the hr.
Keywords: testcase
OS: MacOS X → All
Hardware: Macintosh → All

*** This bug has been marked as a duplicate of 246179 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 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: