Steffen Hi, the name's Steffen and I'm writing about the Web, programming and all those things coming to my mind. Enjoy your stay.

I'm currently working on fabidoo.com - 3D Printing for everyone!

Fat Transparent ShadedBorders

Ryan gave the idea and some code for a new ShadedBorder feature. Fat semi-transparent borders:

Fat Borders

And thanks alot NewTrax for fixing the hover issues on IE6. It needs a bit more CSS to get going, but will solve any issues. Check out the CSS included in test.html on how to use it.

Ah, right: it’s version 0.6 which has all these features. :-)

NewTrax and loads of others asked about the progress with the Safari 2 performance. Well… There isn’t… Apparently the problems result from the poor rendering performance of Safari 2 when lots of semi-transparent elements are on your page. As for ShadedBorder, there are millions. ;-) So maybe it’s a good approach, as NewTrax suggested, to disabled ShadedBorder on Safari 2 - not that bad, at least we’ve got the graceful degradation feature…

Tags: , , , ,

4 Responses to “Fat Transparent ShadedBorders”

  • 1
    Davie Pham Says:

    Ok i user shaded Border and the scripts work really good, except when you make the shaded border box really long i had noticed bottom of the box border and drop shadow on the leftside and rightside border and shadow are disappeared. I tried to look into the script to identify the bugs but i am all blank out. Good scripts keep up the good work.

    Thanks

  • 2
    Inforiculturist Says:

    I’m working on a new website and found your script for rounded corners. EXCELLENT contribution to the community and MANY thanks.

    I struggled just a bit trying to get it to work. At first, I thought it wasn’t working, but it turns out my numbers just weren’t large enough since the shadow border gets subtracted from the rounded spacing (or vice-versa) causing it to look like it’s not working. Also, I had to add enough padding to the container style to make it not look like the bottom content was overflowing outside of the box. But, a little playing around and I got it to work for me. Yeah!!!

    The one thing I’m having some issues with is what is called the shadow implementation. It seems to be more of a glow implementation instead of a shadow since the “shadow” edge is on all four sides, albeit not evenly. For instance:
    ({corner:6, shadow:30, border:1}) yields shadow: 14px L/R, 9px top, 5px corner radius, 19px bottom (both shadow areas add to 28px, not 30px, for whatever reason)
    ({corner:10, shadow:50, border:1}) yields shadow: 23px L/R, 14px top, 5px corner radius, 32px bottom (both shadow areas add to 46px, not 50px, and even if you add the border in there, it’s still just 48px, not 50; corner could be 9 or 10px depending upon how you look at it.)

    I would have expected the glow to be evenly distributed or evenly offset. Somehow, a px gets shaved off here or there in the implementation (as measured by putting a standard CSS border around the thing).

    Personally, I think it looks funky for a shadow, but fine for a glow. I would expect that a shadow would be on two sides, say bottom and right (although making it configurable would be a plus). I’d suggest that this current shadow implementation be renamed to be used a glow implementation and then add another effect to replace the current shadow so that you have a shadow based on the angle of light, offsetting to one side the “glow” so that it provides light angle. Finally, around the TLR corner areas, the glow looks sliced off at the corners giving the glow a weird feeling/appearance, but it’s probably an implementation issue of how the inner part gets floated over the outer part.

    Am I clear as mud on this?

    Note that I realize that I’m not contributing code at this point, just functional symptomatic feedback. Maybe some day I’ll have time to get inside the code and provide some contribution. Again, many thanks for an excellent contribution to the community that has removed many DIV tags from my pages that were solely for adding rounded corners, especially with borders.

  • 3
    Thibaut Barrère Says:

    Hi!

    First thanks, ShadedBorders is very nice to use and very efficient!

    I noticed a bug when rounding a div with a big height (over 2048px). All the lower area (starting from pixel 2048 maybe) doesn’t have the div color, but the background color instead. It happens under Firefox and Safari, with ShadedBorders 0.5. I thought I would report back here.

    best regards and keep up the good work!

  • 4
    adam Says:

    i think it would be great for ruzee borders to be integrated into mootools

  • Leave a Reply

53709