Closed
Bug 308152
Opened 19 years ago
Closed 19 years ago
background image setup for a table cell (TD) using style sheet entries is not centered within the cell
Categories
(Core :: Web Painting, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: cclassen, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6
a background image setup for a table cell (TD) using style sheet entries is not
centered within the cell but withing the browser window.
Example in "Steps"
Reproducible: Always
Steps to Reproduce:
HTML
<TD id="myid"></TD>
JAVASCRIPT
var element;
element = document.getElementById('mytd');
element.height='200';
element.width='200';
element.style.height='200px; //making sure TD cell is 200 x 200
element.style.width='200px;
element.style.backgroundAttachment='fixed';
element.style.backgroundRepeat='no-repeat';
element.style.backgroundPosition='center center';
element.style.backgroundImage='url(images/target-bg.png)'; // use any image here
Actual Results:
background image is centered on the window and not the cell
Expected Results:
background image should be centered in the cell
Build platform
target
i586-pc-msvc
Build tools
Compiler Version Compiler flags
$(CYGWIN_WRAPPER) cl 12.00.8804 -TC -nologo -W3 -nologo -Gy -Fd$(PDBFILE)
$(CYGWIN_WRAPPER) cl 12.00.8804 -TP -nologo -W3 -nologo -Gy -Fd$(PDBFILE)
Configure arguments
--disable-ldap --disable-mailnews
--enable-extensions=cookie,xml-rpc,xmlextras,pref,transformiix,universalchardet,webservices,inspector,gnomevfs,negotiateauth
--enable-crypto --disable-composer --enable-single-profile
--disable-profilesharing --enable-optimize --disable-debug --disable-tests
--enable-static --disable-shared --enable-official-branding
Comment 1•19 years ago
|
||
background-attachment: fixed; causes the problem
remove that and it does fine
I don't know if you are allowed to use that in a <td> or not
<html>
<head>
<title>testcase</title>
<style type="text/css">
td{
width:200px;
height:200px;
background-image: url('dot.gif');
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
}
</style>
</head>
<body>
<table border=1>
<tr>
<td></td>
</tr>
</table>
</body>
</html>
Updated•19 years ago
|
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
Version: unspecified → 1.7 Branch
When using background-attachment: fixed, what you see is correct (Actually, I see no image, because it is clipped, since it is outside of the cell). See http://meyerweb.com/eric/css/edge/complexspiral/demo.html . Otherwise, see comment 2. Marking invalid.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Component: Layout → Layout: View Rendering
Resolution: --- → INVALID
| Assignee | ||
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•