Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to customize the aspect of a single format post, in my case is "Link". I've added a different color background so they look different, editing the CSS as this:

.format-link .entry-content {
    padding: 0;
    font-style: italic;
    background: #d7b5b5; //sfondo rosa
}

So they look like this: http://www.adessomilano.it/wordpress/category/ar/

I'm trying to add a margin between the color and the text in the way there's some free space (but with color background) on left and right side before the text.

I've tried adding Margin and Padding values in the CSS but nothing happens, I think because the padding and the margin space take the white color instead of the pink...

Can someone explain me?

thanks a lot

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Well, first, it's a pure CSS question.

Second, padding is what you want to use.

Just change padding: 0; to whatever you like.

I just used FireBug to hack a padding of 1em into your code, and it worked like a charm.

// Edit

However, it is not just .entry-content but also .entry-summary that you want to affect.

.format-link .entry-content,
.format-link .entry-summary {
    padding: 1em; // for example
    font-style: italic;
    background: #d7b5b5; //sfondo rosa
}

// Edit - again

It seems, you have to work on your style.css.

For singular posts, you already defined a different padding:

.singular .format-link .entry-content {
    padding: 1.625em 0 0;
}

You either have to adapt that as well, or just delete it.

share|improve this answer
    
NO, it works for the excerpt, but not for the article... –  Apteryx Apr 5 '13 at 11:34
    
adessomilano.it/wordpress/category/ar it works, but if you click on the title, you can see the padding doesn't affect the article... –  Apteryx Apr 5 '13 at 11:38
    
I've tried with the "quote" format and it works perfectly, with both excerpt and full content article. But not with Link format. –  Apteryx Apr 5 '13 at 11:42
1  
SOLVED! in another part of the CSS there's "article.format-link" with different padding value, this was affecting just the article and not the excerpt. THANK YOU ANYWAY –  Apteryx Apr 5 '13 at 11:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.