Jump to content
Sign in to follow this  
tuanma

Add padding to featured image in post

Recommended Posts

tuanma

Hello, I'm trying to add a padding-left 10px to the featured image in the post that was added through a hook. I've tried the following css body .content img { padding-left: 10px; } But it pads the images in my sidebar as well. Just looking to add 10px to featured image but can't figure it out in Firebug. http://astairemagazine.com/2012/04/07/louis-vuitton-2012-springsummer-catalog/ Many thanks. Tuan

Share this post


Link to post
Share on other sites
Rob
Tuan, The CSS you're using isn't page specific, it's broad, covering all images in the content area. The featured images in Blog pages, archives, search results, etc include this CSS: [code].post-meta .c_img, #page .widget_wp125 .wp125ad a, .widget_flickrRSS a img, .srp-widget-thmblink { background: none repeat scroll 0 0 #E9E9E9; border: 1px solid #F3F3F3; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }[/code] That places a border and shadow around each image. To move the image 10px right (margin-left:10px), you have to remove the border and shadow. [code].post-meta .c_img, #page .widget_wp125 .wp125ad a, .widget_flickrRSS a img, .srp-widget-thmblink { background: none repeat scroll 0 0 #E9E9E9; border: 0 solid #F3F3F3; box-shadow: 0 0 0 rgba(0, 0, 0, 0.0); }[/code] Then you can add this custom code, which will likely affect boxes and some other things as well in the content area: [code].fpost .media .img img { height: auto; margin: 0 auto 0 10px; max-width: 100%; }[/code]

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
mstmarie1
Target the content column directly. I'm assuming here that you're looking to move the very top image over, and that the layout remains constant with the sidebar on the right. [code]#column-wrap > img{padding-left:10px;}[/code] That should target only the first image in the content area.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×