Left and right borders of a <DIV> tag containing a PNG-32 alpha image are rendered incorrectly.

RESOLVED WORKSFORME

Status

()

RESOLVED WORKSFORME
8 years ago
8 years ago

People

(Reporter: joel.a.villarreal, Unassigned)

Tracking

4.0 Branch
x86
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

298.27 KB, application/octet-stream
Details
(Reporter)

Description

8 years ago
User-Agent:       Mozilla/5.0 (Windows; Windows NT 6.1; en-US; rv:2.0b2pre) Gecko/20100714 Minefield/4.0b2pre
Build Identifier: Mozilla/5.0 (Windows; Windows NT 6.1; en-US; rv:2.0b2pre) Gecko/20100714 Minefield/4.0b2pre

A little white space appears above the top end of the left and right borders, creating an unexpected two-coloured border.

Reproducible: Always

Steps to Reproduce:
1. Attach the following CSS:

html, body
{
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
}

#layout
{
    width: 1000px;
    border-left: 12px solid red;
    border-right: 12px solid red;
    margin-left: auto;
    margin-right: auto;
}

2. Create an HTML file with a XHTML 1.0 Transitional DOCTYPE, and insert this into the <BODY> tag:

<div id="layout">
  <img src="myimage.png" width="1000" alt="" />
</div>
Actual Results:  
Border has 8px or so of white color, and the rest in red.

Expected Results:  
All the border line should be red.

Comment 1

8 years ago
Can you create a HTML testcase and attach it to this bug or provide a URL which exposes this problem?
(Reporter)

Comment 2

8 years ago
Created attachment 457751 [details]
HTML Testcase

Comment 3

8 years ago
Can't reproduce the bug with attatchment 457751. Is this problem new?

Note that 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
triggers "Almost Standards Mode" if served as text/html.

With a "Standards Mode" doctype like
<!DOCTYPE html>
I see a white space at the *bottom* end of the red borders.

This white space is just the lower baseline of the div's inline content.
Setting |display:block| to the image would fix that.
(Reporter)

Comment 4

8 years ago
But why a white space and not just *blank space*?

Updated

8 years ago
Version: unspecified → 4.0 Branch

Comment 5

8 years ago
Mozilla/5.0 (Windows NT 5.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1

As said in comment 3, can't reproduce with attachment 457751 [details].

Chancing to Standards Mode triggering <!DOCTYPE html>, I see a blank space as expected. This space has body's background-color, also as expected.

-> WFM. Reporter, if you see anything different, please explain and reopen.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.