Monday, February 08, 2010 #

.NET Pulse 2/8/2010: Birthday Edition

“The computing scientist's main challenge is not to get confused by the complexities of his own making.” - E. W. Dijkstra

Yup, I celebrate 34 years on this earth today. My birthday wishes are health, happiness and Smartphones for all!

ASP.NET/MVC

.NET

Everything Else

posted @ Monday, February 08, 2010 11:01 AM | Feedback (0)

Friday, February 05, 2010 #

.NET Pulse 2/5/2010

The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. ” - Tom Cargill

ASP.NET/MVC

.NET

Everything Else

posted @ Friday, February 05, 2010 10:33 AM | Feedback (0)

Thursday, February 04, 2010 #

Simulating a Smooth Drop Shadow in IE using only CSS

I’m building out a website for a client in which the navigation text has a subtle drop shadow effect behind. Often I’d resort to an image to achieve this effect, but with most browser supporting at least some of CSS 3, especially text-shadow, I figured it would be worth a shot.

text-shadow: 0px 0px 6px #001234;

So, with the above css, I ended up with this effect in Firefox, Safari, and Chrome:

ff

Not bad, however IE completely ignores the effect. There is an alternative, in the form of the IE specific DropShadow filter, which has one major drawback.

ie-shadow

It looks like poop. First, we loose Anti-aliasing, making the text ugly, second the shadow is completely hard edged and will only allow you to specific which direction to offset the shadow. Not very helpful for the look I need, and not nearly as flexible as text-shadow.

Fortunately (unfortunately?) there is one feature of IE’s filters that we can exploit, you can stack as many of them together as you’d like. In this case I’m going stack several shadows of differing colors and directions to achieve a softer effect.

filter: 
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=1, offY=1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=-1, offY=-1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=1, offY=0, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=0, offY=1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=-1, offY=0, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#8a8772, offX=0, offY=-1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=1, offY=1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=-1, offY=-1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=1, offY=0, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=0, offY=1, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=-1, offY=0, positive=1),
        progid:DXImageTransform.Microsoft.dropShadow(color=#9d9981, offX=0, offY=-1, positive=1)

And we end up with:

ie-multi-shadow

It’s not perfect, but it’s much closer to the original design.

A couple of things to note, IE seems to stack the shadow effect on the previous shadow effect, that’s why the offsets always stay at 1px, but the effect feathers out.

Another caveat was that when I tried to apply the effect to an anchor tag that was set to display:block, IE applied the shadow to the outside of the anchor, not the text. I had to hack a span tag inside my anchor tag to have something to hang this effect on.

The final issue I faced was that the overall effect displaces the text down and to the right. I had to use position:relative with a negative top and left value. This is definitely something you will want to put in a conditional comment block.

If you know of a better way to achieve this effect, let me know.

posted @ Thursday, February 04, 2010 4:50 PM | Feedback (2)

.Net Pulse 2/4/2010

Any code of your own that you haven't looked at for six or more months might as well have been written by someone else. ” - Eagleson's law

ASP.NET/MVC

.NET

Everything Else

posted @ Thursday, February 04, 2010 10:37 AM | Feedback (0)

Wednesday, February 03, 2010 #

.NET Pulse 2/3/2010

Walking on water and developing software from a specification are easy if both are frozen. ” - Edward V Berard

ASP.NET/MVC

.NET

Everything Else

posted @ Wednesday, February 03, 2010 11:16 AM | Feedback (0)

Tuesday, February 02, 2010 #

.NET Pulse 2/2/2010

If debugging is the process of removing software bugs, then programming must be the process of putting them in. ” - Edsger Dijkstra

ASP.NET/MVC

.NET

Everything Else

posted @ Tuesday, February 02, 2010 11:46 AM | Feedback (2)

Monday, February 01, 2010 #

.NET Pulse 2/1/2010

Finally getting around to seriously reading my copy of Domain Driven Design. Does that make me a bad developer?

ASP.NET/MVC

.NET

Everything Else

posted @ Monday, February 01, 2010 10:54 AM | Feedback (0)

Friday, January 29, 2010 #

.NET Pulse 1/29/2010

Of course T-Mobile is had a major outage for android phones 2 weeks before I’m planning on getting a Nexus One. For my Birthday. Hint-Hint.

ASP.NET/MVC

.NET

Everything Else

posted @ Friday, January 29, 2010 11:23 AM | Feedback (0)

Thursday, January 28, 2010 #

.NET Pulse 1/28/2010

I will not talk about the Apple iPad… wait I’m talking about it right now, doh! And of course everyone has seen this original iPad, so no reason for me to repost it.

ASP.NET/MVC

.NET

Everything Else

posted @ Thursday, January 28, 2010 2:22 PM | Feedback (0)

Wednesday, January 27, 2010 #

.Net Pulse 1/27/2010

Something something, Apple something. Someone pointed out that the entry level iPad is cheaper than the unsubsidized Nexus One.

Web

More .Net Stuff

Everything Else

posted @ Wednesday, January 27, 2010 11:20 AM | Feedback (0)

Tuesday, January 26, 2010 #

.NET Pulse 1/26/2010

I’ve been working with a personal trainer at the gym this week and she’s kicking my butt.

Web
More .Net Stuff
Everything Else

Monday, January 25, 2010 #

.NET Pulse 1/25/2010

A little late this morning, but nothing that can stop this .NET train from rollin’.

Web

More .Net Stuff

Everything Else

posted @ Monday, January 25, 2010 1:27 PM | Feedback (0)