Connect with us

Tips & Tricks

Styling your ordered & unordered list items into 2 columns

Published

on

In a previous post I showed you how to create a custom widget, then I showed you how to create a widget for your monthly archives, and limit the month’s that show. I am showing the past 4 months in my widget at this time.

One of my readers: Alex asked:

How did you make the archives widget to show the dates separately into two columns?

Now I will show you a CSS trick to create this effect:

First we will give the unordered list a width of 100%:

ul#archives {
	width:110%;
	}

Then we will style the <li> nested inside.

ul#archives li {
	display:inline;
	float:left;
	width:120px;
	}

And that is it. Please make sure that you clear the float after your closing </ul>.

Continue Reading
4 Comments

4 Comments

  1. Alex

    February 15, 2009 at 7:28 pm

    Thank you, man!

  2. trosor

    February 22, 2009 at 2:04 pm

    nice information

  3. cotton

    February 23, 2009 at 1:51 am

    This is great but is there away to make the list go 1-2 on the left column and then 3 & 4 on the right. I have spent ages trying to organize a list like that. I think it would make sense, if you have a list in 2 columns, you first read the left one and then the right one. Any thoughts or suggestions on this would be much appreciated

    • frosty

      February 23, 2009 at 1:50 pm

      As far as I know, I don’t know a way to do this.

You must be logged in to post a comment Login

Leave a Reply

Tips & Tricks

Remove the title attribute using jQuery

Published

on

In WordPress, when you use wp_page_menu your anchor attribute’s usually carry a title with the same name. I’m not sure if it’s correct to do this, but it bother me when I hover over a page menu navigation link and I get a hover of the title.

So on my site I used jQuery to remove the title:

$("#nav a").removeAttr("title");

Pretty simple huh?

Continue Reading

Tips & Tricks

How to: Open external links in a new window

Published

on

Over the weekend, I attended WordCamp Denver, and I was asked by John Hawkins how to force links to open in a new tab with out editing the source code. So, today lets learn a simple jQuery trick to open all external links in your site in a new tab or window. We are going to make sure you have jQuery active on your site, you can do this easily in WordPress, since it’s bundled with the latest installations. Use this code in your header: <?php wp_enqueue_script('jquery'); ?> then, below the wp_head add the following:

<script type="text/javacript">
var $j = jQuery.noConflict();

$j(document).ready(function() {
//external attribute
    $j("a:not([@href*=http://YOURSITE.com/])").not("[href^=#]")
        .addClass("external")
        .attr({ target: "_blank" });
    }
);
</script>

That’s it, just make sure you change the http://YOURSITE.com to your website.

Update

If you like you can remove the var $j = and replace all $j with simply just $

 

Continue Reading

Themes

Fixing plugins not compatible with hybrid 0.4.2

Published

on

Hey everyone, as you may have noticed I have a running on the site. While everything almost everything moved over smoothly, there was an issue with how my parent theme striped text in typography. This caused some plugins, like cformsII to not be allowed to print to the screen. Justin had helped to find a fix to filter the hybrid_typography function.

Originally this function filtered out and changed some text that would not validate as XHTML. This had to be removed by running a new function in the child theme’s function.php file.

add_action('init', 'remove_typography');

function remove_typography() {
	remove_filter('the_content', 'hybrid_typography', 11);
}
Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Ben Zobrist Net Worth: 4 Interesting Facts You Should Know

Ben Zobrist Net Worth: 4 Interesting Facts You Should Know

Ben Zobrist is an American professional baseball second baseman and outfielder who currently plays for the Chicago Cubs of Major League Baseball. Early Life Ben was born on May 26, 1981, in Eureka, Illinois to Cynthia and Tom Zobrist. He started playing baseball when he was eight years old. He graduated from Eureka High School […]

Angel Strawbridge Net Worth: How Rich is Angel Strawbridge Actually?

Angel Strawbridge Net Worth: How Rich is Angel Strawbridge Actually?

Angel Strawbridge is a designer, author who appears in the popular TV series called Escape to the Chateau along with her husband Dick Strawbridge where they work on renovating a massive Chateau they had bought in France after moving from England. Angel Strawbridge net worth is under review and is not available at the moment. […]

Alexandra Grant Net Worth: How Rich is Keanu Reeves’ Girlfriend?

Alexandra Grant Net Worth: How Rich is Keanu Reeves’ Girlfriend?

Alexandra Grant is an American art designer who examines language and written texts through painting, drawing, and sculpture. She is recently in the news after she was spotted holding hands with famous actress Keanu Reeves. Alexandra Grant net worth currently is under review Grant was born in 1973, in Fairview Park, Ohio. Her parents divorced […]

Pete Buttigieg Net Worth: 5 Facts You Should Know

Pete Buttigieg Net Worth: 5 Facts You Should Know

Pete Buttigieg is the mayor of South Bend, Indiana. He is also an American war veteran and a former consultant. In the recent days, Buttigieg has been growing his name with him announcing candidacy for the Presidential election in 2020. Then President Obama called him as one of four Democrats who represented the future of […]

Trending