You can be the nicest, smartest, most considerate person at your office. But no matter how hard you try to be likeable, you may, at some point, wind up rubbing a colleague the wrong way.

Now it's one thing for a co-worker to simply not invite you to lunch or not go out of his or her way to get to know you. But when it's clear that a colleague of yours can't stand being in your presence, it can make for an obviously uncomfortable situation. Here's how to cope with it.

1. Figure out if you did something wrong

It could be that you and your colleague simply don't mesh. But before you chalk up your horrid relationship to a basic personality clash, think about whether there's a reason your co-worker might despise you. Did you take credit for an idea he or she had? Did you push your boss to let you take the lead on a project he or she was clearly vying for? While it may be that you did nothing wrong, it's worth replaying the past number of weeks or months in your head and seeing if your colleague's behavior toward you could be stemming from a specific action, or inaction, on your part. If that's the case, apologizing and attempting to make amends could help salvage your relationship.

Two women seated next to each other at laptops giving each other dirty looks

IMAGE SOURCE: GETTY IMAGES.

2. Accept that your relationship may not improve

Maybe your co-worker is the reserved type, and you're naturally chatty and outgoing. Or maybe your colleague simply feels threatened by you and, rather than talk it out, would rather talk about you behind your back. It's unfortunate to not get along with someone you work with day in and day out, but if you've tried improving that relationship to no avail, and your co-worker doesn't even bother making an effort to disguise his or her distaste for you, then there's probably little you can to do make things better. At that point, your best bet is to accept that your relationship with that colleague will never be great, and put as much distance between yourself and that person as possible.

3. Bring inappropriate behavior to your manager's attention

A co-worker who doesn't like you isn't obligated to change his or her opinion. But that doesn't mean he or she can act out of line. If that colleague disrespects you in meetings, heckles you during presentations, or behaves in a matter that's similarly uncalled for, don't hesitate to ask your boss to intervene. In fact, it pays to keep a detailed log of your co-worker's bad behavior so you can establish a pattern and ensure that your manager takes it seriously. To this end, jot down the date, time, and details of each incident in which you're treated poorly, coupled with the names of witnesses who can back up your accounts of what happened.

It's hard to coexist with a co-worker who clearly loathes being around you. But while you may have to simply sigh and look away each time that colleague rolls his or her eyes at you or sends a dirty look your way, you don't have to stand for actual abuse. If your co-worker crosses that line, don't hesitate to take the matter to your boss so someone above you can step in.