Bug 45323

Summary: CSS background-repeat: no-repeat ; ignored in nested elements (http://uclabdc.mouthpunch.com)
Product: [Applications] konqueror Reporter: Benjamin Keil <bkeil>
Component: khtmlAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: jm, magnus.kessler
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: another simplified example for this problem
sample showing all...

Description Benjamin Keil 2002-07-16 17:25:05 UTC
(*** This bug was imported into bugs.kde.org ***)

Package:           khtml
Version:           KDE 3.0.2 
Severity:          normal
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.3 (gentoo-2.95.3-r7)
OS:                Linux
OS/Compiler notes: OS: Gentoo Linux 1.2

In nested elements---like table cells---the background property no-repeat does not have the desired effect; the background image is repeated.

For an example please see http://uclabdc.mouthpunch.com/

The relevant CSS code follows:
 background-image : url(/images/BruinBear/BruinBear-BG-B.jpg);
 background-attachment : fixed ;
 background-position : 10% 100% ;
 background-repeat : no-repeat ;
 background-color : #3f64b2 ;


(Submitted via bugs.kde.org)
Comment 1 Andreas Schlapbach 2002-07-16 19:03:50 UTC
Hi there

I can't reproduce that with recent CVS and it also used to work with the 
3.0 series.

Can you check on this site:

http://www.w3.org/Style/CSS/Test/CSS1/current/sec534.htm

Are there any differences to say Mozilla?

Andreas


bkeil@ucla.edu wrote:
> Package: khtml
> Version: KDE 3.0.2 
> Severity: normal
> Installed from:    Compiled From Sources
> Compiler:          gcc 2.95.3 (gentoo-2.95.3-r7)
> OS:                Linux
> OS/Compiler notes: OS: Gentoo Linux 1.2
> 
> In nested elements---like table cells---the background property no-repeat does not have the desired effect; the background image is repeated.
> 
> 
> 
> For an example please see http://uclabdc.mouthpunch.com/
> 
> 
> 
> The relevant CSS code follows:
> 
>  background-image : url(/images/BruinBear/BruinBear-BG-B.jpg);
> 
>  background-attachment : fixed ;
> 
>  background-position : 10% 100% ;
> 
>  background-repeat : no-repeat ;
> 
>  background-color : #3f64b2 ;
> 
> 
> 
> (Submitted via bugs.kde.org)
> 
> 
> (Complete bug history is available at http://bugs.kde.org/db/45/45323.html)
> _______________________________________________
> Konq-bugs mailing list
> Konq-bugs@mail.kde.org
> http://mail.kde.org/mailman/listinfo/konq-bugs
> 


-- 
Andreas Schlapbach      schlpbch@iam.unibe.ch
http://www.iam.unibe.ch/~schlpbch
Comment 2 Benjamin Keil 2002-07-17 05:30:00 UTC
On Tue 2002-07-16 at 14:03 Andreas Schlapbach wrote:
> Hi there
> 
> I can't reproduce that with recent CVS and it also used to work with the 
> 3.0 series.
> 
> Can you check on this site:
> 
> http://www.w3.org/Style/CSS/Test/CSS1/current/sec534.htm
> 
> Are there any differences to say Mozilla?
> 
> Andreas
> 
> 

Perhaps the problem doesn't show up there because it's on paragraph tags
and not on table cells?  I'll fiddle with the UCLABDC page to see if I
can figure out the exact set of tags that is problematic.  Anyways...
did you check out the page at

http://uclabdc.mouthpunch.com/ 

?  If you scroll it up and down it should be fairly clear that the
background is repeating in the blue and yellow pictures of the bear but
not in the white-washed bear (all three have background-repeat:
no-repeat ;)

I'll send you a note when I've checked out the possibilities some more.

-- 
................................................................
: Benjamin Keil       : If she's a liar I'm her lover         :
: Graduate Student in : If she's a priestess I'm her cover    :
: Linguistics and as  : If she's a lady I'm her man           :
: Poor as that sounds : If she's a man I'll do what I can!    :
:.....................:... Alphaville from Jet Set Society ...:
Comment 3 Benjamin Keil 2002-07-17 05:36:39 UTC
> Perhaps the problem doesn't show up there because it's on paragraph tags
> and not on table cells?  

OK... I just saw how it tests inside and outside of table cells...
perhaps it's the "attachment: fixed" + "repeat: no-repeat" that is
causing the problem.

Ciao.
-- 
................................................................
: Benjamin Keil       : If she's a liar I'm her lover         :
: Graduate Student in : If she's a priestess I'm her cover    :
: Linguistics and as  : If she's a lady I'm her man           :
: Poor as that sounds : If she's a man I'll do what I can!    :
:.....................:... Alphaville from Jet Set Society ...:
Comment 4 Benjamin Keil 2002-07-17 06:19:42 UTC
OK... I'm attaching an HTML file which shows my problems.  The same CSS
can lead to both the correct and the incorrect result.  It seems to be a
function of the size of the background-image and the size of the
element.  If the background-attachment is fixed and the elements is
(much?) smaller than the background-image then the image repeats
ignoring the background-repeat: no-repeat ; directive.

In the file below I don't get repetition on the right cell when the
commented out portion is uncommented but I do have vertical repeat when
I comment that section out.

Ciao Ben.

<html>
<head>
<title>Ben's CSS Test</title>
</head>
<body>
<table width="100%">
  <tr>
    <td width="*" style="
      background-image:
        url(http://us.i1.yimg.com/us.yimg.com/i/ww/m6v2.gif) ;
      background-attachment: scrolling ;
      background-repeat: no-repeat ;">
      This <BR> is <BR> a <BR> long <BR> table <BR>
      with <BR> background-repeat: no-repeat ; <BR>
      and <BR> background-attachment: scrolling ;
    </td>
    <td width="*" style="
 color: #FFCC00 ;
 background-image :
 url(http://uclabdc.mouthpunch.com/images/BruinBear/BruinBear-BG-B.jpg);
 background-attachment : fixed ;
 background-position : 0% 100% ;
 background-repeat : no-repeat ;
 background-color : #3f64b2 ;
 border-style: solid;
 border-color: black;
 border-top-width : 1px;
 border-bottom-width : 0px;
 border-left-width : 1px;
 border-right-width : 1px;
 padding-top: 0.5ex;
 padding-bottom: 0.5ex;
 padding-left: 0.5ex;
 font-family : Verdana Arial Helvetica sans-serif ;
 font-size: 110%;">
      This <BR> is <BR> a <BR> long <BR> table <BR>
      with <BR>
      color: #FFCC00 ; <BR>
 background-image :
 url(http://uclabdc.mouthpunch.com/images/BruinBear/BruinBear-BG-B.jpg);
<BR>
 background-attachment : fixed ; <BR>
 <!-- background-position : 0% 100% ; <BR>
 background-repeat : no-repeat ; <BR>
 background-color : #3f64b2 ; <BR>
 border-style: solid; <BR>
 border-color: black; <BR>
 border-top-width : 1px; <BR>
 border-bottom-width : 0px; <BR>
 border-left-width : 1px; <BR> -->
 border-right-width : 1px; <BR>
 padding-top: 0.5ex; <BR>
 padding-bottom: 0.5ex; <BR>
 padding-left: 0.5ex; <BR>
 font-family : Verdana Arial Helvetica sans-serif ; <BR>
 font-size: 110%;
    </td>
  </body>
</html>

-- 
................................................................
: Benjamin Keil       : If she's a liar I'm her lover         :
: Graduate Student in : If she's a priestess I'm her cover    :
: Linguistics and as  : If she's a lady I'm her man           :
: Poor as that sounds : If she's a man I'll do what I can!    :
:.....................:... Alphaville from Jet Set Society ...:
Comment 5 Benjamin Keil 2002-07-17 06:22:40 UTC
Additionally Mozilla renders http://uclabdc.mouthpunch.com/ correctly
that is the background image is not repeated in the upper part of the
screen.
-- 
................................................................
: Benjamin Keil       : If she's a liar I'm her lover         :
: Graduate Student in : If she's a priestess I'm her cover    :
: Linguistics and as  : If she's a lady I'm her man           :
: Poor as that sounds : If she's a man I'll do what I can!    :
:.....................:... Alphaville from Jet Set Society ...:
Comment 6 oever 2002-09-24 10:13:39 UTC
The same problem exits for this page: 
http://www.spectraplant.nl/nl/sortiment.html 
Here also the background image is repeated even though the css reads: 
div.page { 
	background: #000668 url(k2.jpg) bottom right no-repeat fixed; 
} 
 
Comment 7 oever 2002-10-21 12:10:58 UTC
Created attachment 237 [details]
another simplified example for this problem
Comment 8 Magnus Kessler 2002-11-18 17:08:41 UTC
Same behaviour can be seen on http://www.meyerweb.com/eric/css/edge/ with 
latest cvs builds. Here the astronaut background repeats for example in the 
banner section as well as in several of the menu boxes. Desired behaviour is 
to have one astronaut centered (non-repeated) on the page. Mozilla gets this 
right. 
Comment 9 oever 2003-02-04 11:53:26 UTC
This bug is still present in KDE 3.1. 
Comment 10 Marek 2003-02-22 00:46:20 UTC
Created attachment 1017 [details]
sample showing all...

Also in "div" elements 'no-repeat' with 'fixed' doesn't work correctly.
Sample included.
The image should be shown only in the first paragraph (by 1.)
In Mozilla - works correctly
In Konqueror - not
Greetz
TamCaP
Comment 11 Chris Lee 2003-03-09 15:01:22 UTC
This bug is still present in CVS as of March 8th, 2003.
Comment 12 Juergen Mayer 2003-04-24 11:34:46 UTC
Hi, 
 
I have a similar problem, using Konquerer 3.1.1 (KDE 3.1.1) from Knoppix 2003-04-07 
based on Debian GNU/Linux.  
 
gcc version 3.2.3 20030309 (Debian prerelease) 
 
Try 
http://www.ablageplatz.de/konq/de/nf/company/team.html 
which is using 
http://www.ablageplatz.de/konq/shared/msy.css 
 
I am using in the CSS 
  table.main td.content a.ext { background:url(img/common/link_ext.gif) no-repeat; 
but the image gets repeated. 
 
No problem in Mozilla 1.3 
Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.3) Gecko/20030327 Debian/1.3-4 
on the same CD. 
 
J
Comment 13 Rune Barnkob 2003-05-04 18:39:00 UTC
I am experiencing a similar bug. 
Try http://crusher.dk/ 
If you scale the window to a medium size (a width of about 500), the navbar on the left 
works but the background image in the "contents" division is repeated.  
If you scale the window to a large size, the light background suddenly extends to the left 
edge. 
Comment 14 Daniel Naber 2003-06-14 16:40:22 UTC

*** This bug has been marked as a duplicate of 59600 ***