4 sided container shadow, with 1 image, can you do better?

Done! I wanted to make a total plug-in-shadow. So say I had a site already built. I wanted the ability to simply add the shadow code to it without disturbing anything or having to make any adjustments to the code I already had in place. So, you simply add this around the wrap. Total transparency - total adjusts to size - totally simple. Thanks for your help guys!

<div class=“shadow”><div class=“a”></div><div class=“b”></div><div class=“c”><div class=“d”><div class=“e”>
<div id=“wrap”>

And then some css…

Nah I have windows.

I guess that sorta explains it. I have a very small screen.

Well, the container was set at 70%, so it should of been the same distance in percent, as mine. I only have a stupid 1024 res. I hate it! It affects the look of the sites I build. When ever I see a site I built on a larger screen, It looks puney.

I have smaller then that lol.

And yea I have the smae problem :(. Is Paul’s soluion (the one with the rounding error or w/e) still showing hte bug? I’m on a very big monitor right now so I wanna take a stab and see if I can see the thing)

Paul fixed his already. [URL=“http://www.visibilityinherit.com/projects/shadow-pauls.php”]

Eric, it looks stunning. Well done, and thanks for sharing. :slight_smile:

In my high resolution monitor, I see a major … gap appearing in Chrome where the iamge doesn’t seem to be there.
It’s not on your final thing though.

Thanks Ralph. I do like the shadow, although regretably, the site is very generic. But, that’s what she wanted. Their the boss.

I didn’t end up using that code. I opted for more divs/code (based on big Johns) in favor of simplicity/plug-in-play. But I’m guessing the gap may be do to your newly large screen, 70% width container, and only a 1000px wide shadow. That thing is not a demo or anything - only a test page. Let me know though if you find a way to kill the bug without having to add another container.

I would just edit my previous posts, but since I can’t do that (should allow that functionality for advanced members???) here is previous posted links/code final home (all the others are ERROR 404’s). http://www.visibilityinherit.com/code/four-sided-plug-n-play-shadow.php

Thanks Eric. (Maybe you should redirect those old links to the final example? Not sure…)

Members used to be able to edit their posts but a couple of high profile members left the forums but first went back and deleted hundreds of their posts making the threads worthless.

It also allowed in spammers who would post a normal post and then re-edit the post a few weeks later with spam.

here is previous posted links/code final home (all the others are ERROR 404’s). http://www.visibilityinherit.com/code/four-sided-plug-n-play-shadow.php
I’ve edited a few of your posts posts to reflect the new url.

I note in this example that you are getting a nasty 1px jog in Firefox as you open and close the screen (my versions doesn’t seem to suffer from that).

Morning Paul :),

I’m not seeing that 1px jog on my Firefox/3.5.5. However, all the browsers were choking pretty bad on the large shadow image I was using (3000px x 5000px). The kb was small, but the size along with the browser necessary calculations was a bad combo. I decreased the size of the image to 1500px x 3000px and that seems to keep the browsers happy. You still see it? If so, maybe it’s your internet connection…

Hi Eric,

I get the jog in FF3.5 and FF 3.0.
It has nothing to do with the connection as it is visible when static.

There’s a screenshot attached.

It’s not a big issue but I did notice it straight away. :slight_smile:

I do see it in your screenshot (although, that looks more like a one-third pixel jog), however, no matter what I do, I can not duplicate that in any of my browsers. Here is a screenshot from my screen at full screen width (the same result at different widths). [URL=“http://browsershots.org/http://www.visibilityinherit.com/code/four-sided-plug-n-play-shadow-demo.php”]And here is browsershots screenshots . I’ve looked at five of them in browsershots and they’re all perfect with no 1px jog. So your guess is as good as mine? :slight_smile:

Hi Eric,

You won’t be able to see it in a browsershot screenshot unless you can set the width of the screenshot to an odd number of pixels.

I can see the jog in XP but my laptop running vista doesn’t show it. It may just be an xp thing (or maybe a monitor setting as my main screen is 1680x1050).

Well I’m on a XP. I just went through pixel 400px - 410px, 1px at a time - and nothing. The only way I could duplicate it is to zoom my screen out 4 times. I guess that mimics a res. I guess the easy fix is just give the container a even px value then.

It doesn’t look like it’s a big problem so I wouldn’t worry :). It was probably just showing up on my particular settings.

I agree. :slight_smile: But, this was bugging me. I’ve been trying to narrow down the descrepancy between your code and my example (mainly Johns code). I “think” it comes down to the image used. 1px bigger or smaller. Because look here. I took your code, and used my new larger image (1500px x 3000px) and if I zoom out 3 times (just like with my demo) I can duplicate the 1px jog. [URL=“http://www.pmob.co.uk/temp/roundshadow-oneimage.htm”]However, using your code, and your image (eric-shadow.png) then it takes 4 times zooming out to duplicate the jog. I think it’s the image.

That seems to be it. The first example shows me the jog but the second one doesn’t.:slight_smile:

I should have been a detective, I would have been happier. Of course, then I would just long for other. The “grass is always greener syndrome”. We want what we don’t have - we have what we don’t want.