I'm pulling in a tumblr feed using tumblr's code, and using after: to add an image as a separator between posts. I'd like to center the image, but haven't had luck doing so. Since tumblr's generating the content, not me, I don't think I can use span tags, which seems to be the usual answer. Any other ideas?
Page showing feed in use: lumn.net/index.shtml
CSS:
.tumblr_post:after {
content: url(../img/flower.png);
display: block;
position: relative;
margin-top: 42px;
margin-bottom: 24px;
margin-left: auto;
margin-right: auto;
}
Try this:
.tumblr_post:after {
content: url("../img/flower.png");
display: block;
margin: 42px auto 24px;
position: relative;
text-align: center;
width: 100%;
}
While the answer from Zoltan Toth works, it's got a bunch of code that does nothing for the desired effect. This should do the trick and with less code.
.tumblr_post:after {
content: url("../img/flower.png");
display: block;
text-align: center;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With