Why is that? Do developers not care enough about pixel perfection? No, it's just that browsers render your graphics in a different way compared to Photoshop (Get used to that). Also, re-using similar styles in Photoshop has no real benefit: while developers will combine similar styles all the time to make code faster.
When developers start coding what you created they have to follow certain rules; they create classes in HTML, stylize them in CSS and expect some distances and colors to be constant. It's all about consistency: if you create in Photoshop what is supposed to be a Heading 2 tag on the web - like a title of a paragraph - and the distance to the element below is 20 pixels, expect developers to create a rule for that (margin-down: 20px). Let's suppose you create a new Photoshop document for the same web project, with another h2 tag element. You can care or not about making distances the same, but on the web that distance will be the same because the same CSS rule is applied*.
This simple example introduces a case where a detail (distance between the h2 title and the element below) looks a bit different because as a designer you don't care as much about CSS rules.
*Of course you can have different styles for H2 tags, but not for hundreds!
Learning some development skills changes a lot; from the moment you start getting your hands dirty you will probably never have enough. You understand why it's always better to choosing "Multiply" as your blending mode for shadows in Photoshop, instead of "Color Burn". Multiple new solutions start filling your mind when you are up to solve a usability problem. You can finally suggest some CSS solutions to developers or, even more exciting, you can actively take part in the development process.
Believe it or not, you may even start designing directly inside the browser.
When you realize how easy it is to work with HTML and CSS there is a good chance you will want to be great at this; not just a newbie who can put a couple of lines of code together. There is a huge amount of creatives who run blogs about front-end development. Take a look at Line25 managed by Chris Spooner as a great example.
New trends are thriving due to the challenge of making the web responsive. Building websites and applications that adapt easily to different devices inevitably pushed us to make things minimal and flat. We are supposed to use fewer bitmap elements - like textures - and the same buttons that were created in Photoshop and sliced as .png images are now entirely created in CSS3. Web technologies are evolving; hiding ourselves behind the graphics tool we love so much won't help us in the near future.
Clients expect us to show them work in progress; How are we supposed to show a responsive layout? Surely not though a standard fixed Photoshop document, nor we can imagine creating a new Photoshop document for each scenario. Understanding web technologies allows us to explain the client how the website will react to different device sizes, show them online examples and, eventually, code a simplified version of the responsive web design. We may even move towards a different approach in Photoshop: instead of designing the standard way (960grid template), we could just work on a template that shows the color palette, button styles, other element styles that will then be combined to create the responsive website. It's like showing the clients all the pieces that will play a role in the final design. Think of Twitter's Bootstrap as an example.
Here is a list of resources that will help you to start this new learning adventure. It won't be difficult, I promise. For sure it will be worth the effort!
My goal with this article was not to turn you away from your favorite tools or state that we all must be developers, but it is important to realize how natural it is to follow a learning curve that will push you through basic web development. From that point you can decide whether to spend more time on a code editor or a graphics tool. The web will certainly always need people who are pixel obsessed and who'd rather only design things. But if you are one of them; a basic knowledge of how the web works behind the curtain will make you a much better UI designer.
What do you think? Have you dabbled with coding before? Do you prefer staying in the realm of design?