[jQuery] Re: [jQuery Corner] Problem using nested corners/borders

2009-09-02 Thread Leonardo K
Your css is the problem :D

Missing the "." before the testing

On Wed, Sep 2, 2009 at 15:14, J. Martin  wrote:

>
> I am attempting to create a box with malsup's jQuery nested corners,
> but can't get it to display properly.
>
> Here's my CSS:
> testing { margin: 0; background: #ffc; padding: 10px; border:0; zoom:
> 1;}
> div.outer { float: left; margin: 15px; background: #c82; padding: 8px;
> width: 22em }
>
> My JS:
> $(function(){
>$('.testing').corner("round 8px").parent().css('padding',
> '4px').corner("round 10px");
> });
>
> I'm using this as my test HTML:
> RoundTesting div>
>
> You can see my testing page at:
> http://www.dhome.net/test.php
>
> The result of this is the the above code is that the background color
> the box becomes color of the outer div, #c82. The internal border is
> not displayed. What is my error?


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread Bart Hermans
I've already spent hours trying to get the styles right, so I've kind of
given up. :)
I found another solution (http://www.spiffycorners.com) and that seems to
work correctly.
I will definitely use the corners plugin for other div's on my site but just
not for this one... :)
Mike, thanks a lot for your help!

On Thu, May 29, 2008 at 5:57 PM, malsup <[EMAIL PROTECTED]> wrote:

>
> > Yeah, but then the foreground div is still transparent.
> > The website will 'shine' through.
>
> Not if you set your styles correctly.
>


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread malsup

> Yeah, but then the foreground div is still transparent.
> The website will 'shine' through.

Not if you set your styles correctly.


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread Bart Hermans
Yeah, but then the foreground div is still transparent.
The website will 'shine' through.


On Thu, May 29, 2008 at 4:44 PM, malsup <[EMAIL PROTECTED]> wrote:

>
> > The background div has to be positioned absolute, because it overlays the
> > actual site "beneath" it.
> > If you do that with your example, the foreground div will also be
> > transparent.
>
> I see what you mean now.  With the way your markup is structured there
> is no way for the corner plugin to figure out what the right color is
> for the corners.  It walks the ancestor tree looking for an element
> that has a background color defined.  But you should be able to
> achieve the same look by nesting the divs like this:
>
> http://www.malsup.com/jquery/corner/test4.html?v2
>
> Mike
>


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread malsup

> The background div has to be positioned absolute, because it overlays the
> actual site "beneath" it.
> If you do that with your example, the foreground div will also be
> transparent.

I see what you mean now.  With the way your markup is structured there
is no way for the corner plugin to figure out what the right color is
for the corners.  It walks the ancestor tree looking for an element
that has a background color defined.  But you should be able to
achieve the same look by nesting the divs like this:

http://www.malsup.com/jquery/corner/test4.html?v2

Mike


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread Bart Hermans
Hi Mike,

Thanks for your quick reply.
I can see that your example works, but there are some problems with it.

The background div has to be positioned absolute, because it overlays the
actual site "beneath" it.
If you do that with your example, the foreground div will also be
transparent.

So I used the following html:




(rest of the site)


Now, the background is transparent, but the foreground isn't.
And I can't get the corners to work like this.

On Thu, May 29, 2008 at 3:05 PM, malsup <[EMAIL PROTECTED]> wrote:

>
> > First I display a div that covers the whole page and has a black,
> > transparent background.
> > Then I show another div, white background, centered on the screen.
> > So it's a kind of popup.
> > The problem is that when I just use $(...).corner(), nothing happens.
> > But if I color the corners with $(...).corner("cc:#000"), I can see the
> > corner, but it's black.
>
> Hard to say without seeing the whole page, but a very simple test case
> using your code works fine:
>
> http://www.malsup.com/jquery/corner/test4.html
>
> Mike
>


[jQuery] Re: jQuery Corner problem

2008-05-29 Thread malsup

> First I display a div that covers the whole page and has a black,
> transparent background.
> Then I show another div, white background, centered on the screen.
> So it's a kind of popup.
> The problem is that when I just use $(...).corner(), nothing happens.
> But if I color the corners with $(...).corner("cc:#000"), I can see the
> corner, but it's black.

Hard to say without seeing the whole page, but a very simple test case
using your code works fine:

http://www.malsup.com/jquery/corner/test4.html

Mike