2k11: adjust sidebar width?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
chris_goe
Regular
Posts: 11
Joined: Wed Sep 21, 2011 1:53 am

2k11: adjust sidebar width?

Post by chris_goe »

Hi,

I really like the 2k11 and already use it, but I find the sidebar (on the right, with the calendar, the category list and HTML nuggets installed) a bit too wide.

I'm a total CSS noob, is there anyone who can tell me which knob to tweak in templates/2k11/ to make the sidebar smaller (and more space / line-width for the actual content).

Thanks!
unnecessary linebreaks
unnecessary linebreaks
blog-1.png (52.83 KiB) Viewed 6374 times
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: adjust sidebar width?

Post by Timbalu »

This is easy to solve. Use the 2k11 user.css Generator at http://yellowled.github.com/ to adjust the content/sidebar width and enable the user.css use in your 2k11 config.

Additional note:
If you have linebreaks in your content which you did not write into and don't want them there, this might be the result of the default event plugin "nl2br", which just adds a "<br />" after each Cursor ENTER-linebreak of your entries content, e.g. in html structured entries. This is also easy to avoid, if you know about this behaviour.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
chris_goe
Regular
Posts: 11
Joined: Wed Sep 21, 2011 1:53 am

Re: 2k11: adjust sidebar width?

Post by chris_goe »

Timbalu wrote:This is easy to solve.
Indeed, it was! Thanks for the hint, yellowled.github.com did the trick!

Regarding the linebreaks: no, nl2br is not installed. When I switched to 2k11 the <pre>-formatted parts in older entries were wrapped in "unusual" places because the new layout was too narrow to display them properly. Now with "#sidebar_right { width: 25%; }" it looks kinda normal again.

Thanks again for the speedy response!
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: adjust sidebar width?

Post by Timbalu »

I know that was not your problem. But to say nl2br is installed in every case, as it is default... until you have disabled it, which is not recommended, as it has influences to nearly every databased output.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
chris_goe
Regular
Posts: 11
Joined: Wed Sep 21, 2011 1:53 am

Re: 2k11: adjust sidebar width?

Post by chris_goe »

Hm, I think I have disabled nl2br a long time ago. I remember it looked weird for certain entries. I just started manually adding <br> tags where needed. When I enable nl2br now, all the <br> tags are doubled in older entries so I've disabled it again :-)
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: 2k11: adjust sidebar width?

Post by Timbalu »

Well, I understand, thats odd.
But nl2br influences at least entries, extended entries, staticpages, sidebar "HTML Nugget" and comments. Disabling it in total isn't good - you should turn it on again and disable only the entry parts in its config (if you have to).

For all others, with Serendipity 1.7 extended nl2br plugin you will be able to use some easy no-br clasps to avoid newline breaks in entry parts.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
onli
Regular
Posts: 2825
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: 2k11: adjust sidebar width?

Post by onli »

Ian, it's perfectly fine to disable nl2br. It only makes newlines visible. That's not a necessary feature, as you can do that yourself (or just use textile). The op already stated he understands what he is doing.
Post Reply