It seems as if every office has a person who is less liked than most people. A lot of times, such people have earned the scorn -- they may have done something to trigger co-workers' disdain.

Sometimes these people are just jerks. They know what they're doing and relish the role of being a bad guy. But most of the time, those who earn a reputation as bad co-workers may not know what they're doing.

That means you could be (or could become) a person who is not well-liked -- without even knowing what you did. Avoiding the three scenarios below should help you stay on your co-workers' good side.

A person holds a flag that says help while hiding under a laptop.

It's easy to stay on your co-workers' good side if you make an effort. Image source: Getty Images.

Don't call someone out in public

Maurie Backman: Over the course of my career, I've certainly had my share of disagreements with co-workers. And typically, when someone argues with me on something, I dig up enough research to support my stance if I truly believe I'm right. That said, the one thing I've always made an effort to avoid is calling co-workers out for being wrong in public settings, such as during meetings.

The way I see it, making a co-worker feel sheepish in public will only hurt the relationship and make that person feel bad. So why do it? A better bet is to sit that person down privately and hash out the details he or she needs to know, rather than let others be privy to that discussion.

I once had a colleague argue extensively with me about something during a team meeting, and afterward, I went back to my desk, pulled up some data, and marched over to his desk to prove him wrong -- in front of the rest of our team.

But once I got there, something in my brain triggered a warning signal, and so instead, I asked for a quick chat in the corner conference room. I then proved that I'd been right in that scenario, at which point he not only apologized for his behavior, but applauded me for sparing him the embarrassment. That incident actually improved our relationship, and we came to work quite well together afterward.

Don't tell them too much

Selena Maranjian: We often spend more time with our co-workers than we do with our loved ones -- and many of them become good friends of ours. Be careful, though, because it can be a bad idea to say too much to a co-worker

So what should you not say to a co-worker? Well, for starters, don't bad-mouth your boss -- or your colleagues. Sometimes things you say may find their way to the wrong ears, hurting you. If you're unhappy at work, and/or if you're looking for a new job, try not to let others know. A colleague may accidentally (or not so accidentally) let on to the boss or someone else about it, and that can make your life more difficult or unpleasant at work.

Keep your political and other potentially controversial opinions in check, too, as they can lead to discussions that foster polarization and discord. If you're dealing with some health issues, be wary of oversharing about that, lest others see you as weak and fail to include you on important projects -- or even fail to promote you. 

Don't share about any times that you break some rules or act unethically, either, because what might seem minor or unproblematic to you could strike a colleague very differently. For example, if you took some sick days without being sick or if you've helped yourself to some notepads from work for your home, those are not only things that you shouldn't do, but they're things that someone might tell others about.

Finally, it's generally best not to tell your colleagues too much about your private life, as it can get unprofessional beyond a certain point. You might share that you're getting married or getting divorced and say a little about it now and then, but try not to talk about it too much or to go into too much detail.

Don't be a credit hog

Daniel B. Kline: Who did what on a project is not always obvious. The same can be said for how credit gets divided. One person may view having the original idea as the most important thing, while someone else will view having done the grunt work as key.

Both may be right or both may be wrong, but it's always best to be generous in sharing credit. If you worked on something with other people, celebrate their work -- even if you think your efforts were the most important ones.

It's better to be overly gracious than to be stingy with credit. If you did the lion's share of the work, the boss will figure that out over the course of multiple projects, and so will your teammates.

Be a good partner, and co-workers will want to work with you and for you. That's an important step toward becoming a boss, even if that's not your chief goal.