In order to write funny stuff - whether it be cartoons, comedy skits, screenplays or slogans on buttons and magnets, I think you have to have a skewed way of looking at things. I think you have to recognize the comedy and craziness in everyday life and, then, take the risk of putting it on paper. Sometimes this makes you appear to others as "odd" or "strange." I've watched how people interact with each other, argue, stand their ground, and once said to someone in the middle of a heated exchange, "You have no idea how funny you are." This was met with stares of disbelief and anger, which was funny in itself.
But while you're looking at the world differently and seeing the humor in everyday situations, you have to be able to put this "funny" on paper, or online, or however you want to make a record of it. You have to be willing to let the humor out - you have to be willing to put things down on paper that you would never say in public. You have to take risks. It's what I call "letting the humor out."
Recently I was at an event where I struck up a conversation with another writer, someone who wrote news and features (my background) and seemed interested in how I came up with ideas for cartoons. I told her I try to see the humor in various situations. In the case of human relationships, I have the characters say things to each other that I would never say to someone in real life. The surprise of people saying these things to each other (speaking the truth when it's hard to do so in real life) is what creates the connection and the humor. You have to be willing to take the risk of putting these thoughts on paper and not just thinking about them.
The funniest thing in the world is the truth.
You have to let the humor out.