Mystery margin / padding in Image Widget?
-
Hi yet again!
I’m having a little trouble aligning my sidebar widgets. I want them to have equal spacing between each widget (in addition to an overall margin-top of 15px – to stay in line with the main page text. Although perhaps I could include this in the padding of the first widget… I digress!)
So, I’ve had a little success with altering the .widget-container margins but I’m still stuck with this one little bit that I can’t shift. It’s the yellow bar in this pic: http://i.imgur.com/0CaBy.png
I can’t identify it in the CSS and am at a lost end – any ideas?
Cheers!
The blog I need help with is: (visible only to logged in users)
-
This is a little tricky since you have to affect the widget margin-bottom without messing with it in posts (otherwise wrapped text might butt right up against the bottom of your images in your posts and pages. Give this a try and then adjust the bottom margin as you wish.
.widget-container img.alignleft, .widget-container img.alignright, .widget-container img.aligncenter { margin-bottom: 0 !important; } -
Hey TSP,
Great, thanks for that – I’ve just tried it and it seems to work, although I’m not sure I fully understand what’s going on!
Have you included alignleft, alignright, etc. just to cover all bases?
Why doesn’t that work if you just target .widget-container on its own, with the img.alignleft et al?
-
-
Ah! I think I’ve finally twigged, the alignleft is the img class!
So does that mean you can target individual widgets using something like:
.image-4 .aligncenter .widget-container
?
- The topic ‘Mystery margin / padding in Image Widget?’ is closed to new replies.