« Why Torture? | Main | How Democrats Lose on GOTV »

September 18, 2006

Tech Question

I've reestablished the Miniblog using a del.icio.us feed on the right sidebar. I'd like, however, to make the text margins smaller. Any clue how I'd do that? The javascript they give you doesn't seem to have the requisite field.

September 18, 2006 | Permalink


You should be able to extend your CSS to adjust the margins. The miniblog lives inside a DIV with class "delicious-posts", so imposing a style on ".delicious-posts ul" in your stylesheet should work.

I don't know how conversant you are with CSS, so I don't know whether I've actually been helpful yet or not.

Posted by: Doc Hatter | Sep 18, 2006 2:20:47 PM

Adjust the width value of #right in the CSS. It might be easier to create a separate DIV for the miniblog JS include, with individual style elements to control the text-height and font size.

Posted by: pseudonymous in nc | Sep 18, 2006 3:30:28 PM

Doc -- I think that's right. There's a delicious page showing basically how to do just that. But how would I do the CSS to just make the text smaller and the margins narrower? I have, I fear, very poor tech skills.

Posted by: Ezra | Sep 18, 2006 4:15:20 PM

How narrow do you want the margins? You can specify the width of the text as a fraction of the width of the sidebar, which might be the easiest. Try something like:

.delicious-posts ul, .delicious-posts li, .delicious-banner { margin: 0; padding: 0; width: 50%; }
.delicious-post { padding: 0.25em; font-size: 75% }

The 50% can be changed to whatever width (in terms of the sidebar) you want; likewise, the 75% dictates how large the text is in terms of the default, and can be adjusted to suit.

Posted by: Doc Hatter | Sep 18, 2006 4:37:23 PM

You probably want to change the 'line-height' for the .delicious-post class, too.

Posted by: pseudonymous in nc | Sep 18, 2006 5:36:12 PM

The comments to this entry are closed.