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

RESOLVED DUPLICATE of bug 246179

Status

()

Core
Layout: Block and Inline
RESOLVED DUPLICATE of bug 246179
12 years ago
12 years ago

People

(Reporter: Olaf Marzocchi, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

12 years ago
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

Comment 1

12 years ago
Duplicate of/related to (bug 273145 ->) bug 244932 and/or bug 246179?

Comment 2

12 years ago
Created attachment 193475 [details]
reduced testcase

A float:left div, and a div with a hr.
I added height to the divs and margin to the hr.

Updated

12 years ago
Keywords: testcase
OS: MacOS X → All
Hardware: Macintosh → All

Comment 3

12 years ago

*** This bug has been marked as a duplicate of 246179 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.