i’ve create a custom sidebar in my wordpress site
register_sidebar(array(
'name' => 'Home Widgets',
'before_widget' => '<div id="%1$s" class="blurb %2$s">',
'after_widget' => '</div> <!-- end .widget -->',
'before_title' => '<h4 class="widgettitle">',
'after_title' => '</h4>',
));
And i’ve added 3 widgets into it using the widget panel in admin page.
This is the css
.blurb { float: left; margin-right: 96px; width: 256px; }
I’ve also declared a “last” class to remove the margin right to the last (third) widget.
.last { clear: right; margin-right: 0 !important; }
How can i apply the “last” class to the last widget?
You don’t need to. Change the margin to
margin-left
and make a class.blurb:first-child {margin-left: 0;}
and you should be fine. IE7+ compatible.