Post Pic

How to: Add a line break between sidebar widgets

Widgets are great, that is a sure thing. But sometimes, they can be annoying, for exemple when they don’t look the way you want or need. The most common problem seems to be adding a line break between widgets. Here’s how to do it.

To add a line break between sidebar widgets, simply open your style.css file and append the following code:

.widget{
    margin-bottom:25px;
}

Easy, isn't it? Note that it is possible to add a linre break to a specific widget only. You'll need its css id for that.

19 Responses

Feb 28 2009 11:35

Thanks for sharing. It’s an easy and useful recipe.

Feb 28 2009 12:17

thanks, I really like these short tweaks…

Mar 01 2009 06:23

Easy and needed as always.

Thank you

Mar 01 2009 07:30

Short and sweet. Gets the job done.

Mar 01 2009 12:04

I am lucky my theme is programed to create a gap between every new widgets. But its nice to know that it can be done easily too. For newbie it will be very helpful.

Mar 01 2009 13:37

Nice css tip :-) .. Short and functional …

Mar 02 2009 06:53

Instead of “px” as the unit of measure, using “1em” would more closely simulate a line break, as it would be more compatible with the general font size.

Mar 02 2009 09:36

Often times you may need to clear a float a widget may be inheriting.

So you may want to use clear:left;

Mar 02 2009 11:57

I don’t know about that. I mean it’s a nice tip however there is such thing like too many widgets and I guess you reach that point when you need to use lines to separate one from another…

Mar 05 2009 06:27

Short and useful tip. Yet I love this blog. I’ll subbscribe to your rss to get all updates.

Mar 07 2009 18:20

Didn’t really help.. My widgets still appear cluttered..

Apr 05 2009 08:41

This is perfect as the widgets seem to run together at times.

Apr 25 2009 14:26

Or use the Text widget to put a <br /> between widgets. ;)

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required