Tuesday, January 25, 2011

Blogger CSS Tweaks: Remove Border and Box Shadows from Images

Blogger templates such as Simple include a rather large box shadow and border around most images on the blog. I find this style suited best to photo blogging, but not so well fit to my topics and posting style. Many others I've encountered feel the same. Luckily, It's a simple matter of altering a key CSS style to remove this feature from your images.

Removing the Style
Open up Design->Edit HTML and search for .post-body img to find the responsible style. As you will notice this style is applied to several other images, so altering it will impact many parts of your blog. If that's what you want, scroll down just a few lines and delete these:
-moz-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
-webkit-box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
box-shadow: 1px 1px 5px rgba(0, 0, 0, .1);
This takes care of the box shadow, but leaves the border intact. Just above the deleted lines you should see this border: 1px solid $(image.border.color);. Simply change the 1px to 0px to remove the border. Preview your changes and save if you're happy with the results, easy.

For more simple Blogger tweaks like this, follow this link CSS Tweaks.
24 Comments
Comments

24 comments :

Jody Grigg said...

How to I remove the drop shadow from the left and right sides of my main blog? http://jodygrigg.blogspot.com

PS Thanks for the code for removing the nav bar up top.

Unknown said...

Hey Jody,

It's a similar process only this time search for .content-outer { and then remove the below lines(may look a little different due to variables)

-moz-box-shadow: 0 0 40px rgba(0, 0, 0, .15);
-webkit-box-shadow: 0 0 5px rgba(0, 0, 0, .15);
-goog-ms-box-shadow: 0 0 10px #333333;
box-shadow: 0 0 40px rgba(0, 0, 0, .15);


Hope that helps.

katie said...

thank you! I've been trying to figure this out all night. your instructions worked perfectly!

Unknown said...

@katie

Excellent, glad it worked for you.

Unknown said...

GENIUS! Thanks! :)

Abigail. said...

Worked perfectly! Thank you :D

Red Denal said...

This is really genius. Thanks for blogging about this. Sometimes Those defaults are limiting blogger's creativity. Thanks indeed.

Red @ Virtual Business Matters

The Charley Girl said...

This is perfect! Thank you SO much!

sophie said...

This is amazing. Thank you for sharing!

Jessica Viray said...

thank youuuuu! Finally something that works! :)

Take me to Tarah said...

So helpful!!!! Thanks so much!
Always,
Tarah and the City

Marie August said...

This isn't working for me with Internet Explorer. Works just fine with Fireforx and Chrome, but I can't manage a way to get rid of shadow boxes in IE.

Marie August said...

More specifically, I'm not trying to remove them from images, but from the gadgets as mentioned in an earlier comment.

Sissy Sparrows said...

Thank you so much.

sally may mills said...

Thank you for a simple, clear explanation. Worked first time and I am a total HTML dummy.

Amanda said...

Thank you, Thank you, Thank you! I've been trying to figure that out off and on for weeks! You're the first person I found that wrote something that actually worked!

Helyn said...

THANK YOU!!!!!!! Been trying to get rid of photo shadows for-ev-er! You rock.

http://helynshealthykitchen.blogspot.com/

Jenna said...

Still getting shadows on main post feed and sidebar...any ideas? Thanks!

Jenna @ http://rainonatinroof.com

Unknown said...

@Jenna you have box-shadow styles on your .date-outer and .main-inner .widget elements. Search your template for those and remove the box-shadow styles.

Unknown said...

Very helpful. thank you! Have followed you.

The Curious Treehouse said...

Hi, Im having the same problem with the gadgets down the side and a shadow around them!

when it comes to .dater-outer and .main-inner where will i find that section and what am I deleting?

The Curious Treehouse said...

ive worked it out just looked for the 'box shadow' code above and deleted it :)

キーリん♡ said...

Hi, thank you for making this post! But what if you just want to remove the border and shadow from the images in your posts and not in the template itself? I use a lot of smaller images to go in the text. Thank you!

Unknown said...

Nice but don't work in my blog...............
please help
http://techsitebd24.blogspot.com/

Post a Comment