No image padding on the right side
-
I’ve customized the DePo Masthead theme to my own style, changing the white background to black and various bits and bobs. The thing that’s bugging me is to do with the handling of images. DePo Masthead automatically shrinks images for the posts on the front page and as handy as this is, it’s bugging me that the extreme right hand side of the image is lost, or edges right on to the side of the CSS container. I can put 3px padding on the left, top and bottom of this CSS element, but when I try to apply the padding to the right, it gets automatically stripped out of the custom code. I’ve even tried to add space on to the actual images, but this isn’t showing up on the page. This is a minor thing, but it’s bugging the hell out of me. Any suggestions?
The blog I need help with is: (visible only to logged in users)
-
-
@skinnymedia, you’ll need to check cross-browser compatibility, but you might try something like this:
#home #content img { max-width: 290px; }Agreed. Your CSS adaptation does look snazzy!
-
@designsimply
Thanks for the suggestion, but when I try that the image gets distorted and doesn’t maintain the correct aspect ratio as per the automatic shrinking. I don’t know of any way to maintain the ratio in code and any attempt to use other types of measurement (% or em) doesn’t seem to work either.Oh, and thanks to both of you for the compliments!
-
I realised that there was some inherited margin definition which was making things weird, so I adapted your suggestion to:
#home #content img { margin:-4px;}and it seems to work! I’m not sure where the rogue right margin definition comes in, but thought I would post my slightly dirty solution here, as it might help someone else. Seems to have fixed other IE6 issues, as well. Huzzah! And thanks for your help!
-
- The topic ‘No image padding on the right side’ is closed to new replies.