Get up to speed with the most outrageous laws and homeowners association rules.

It’s important to know the laws of your land and your neighborhood. Both governments and homeowners associations, or condo associations if you are a condo-dweller, can levy powerful—and sometimes incredibly strange—restrictions and requirements. Some can be pretty costly, as Pennsylvania residents recently found out with the potential new requirement for sprinkler systems in single-family homes.

Even celebrities such as Earvin “Magic” Johnson and Samuel L. Jackson can be at odds with an HOA. Here are seven crazy examples of laws and HOA rules:

In Odessa, Fla., a resident was fined by his board for parking his pickup truck in his own driveway because it wouldn’t fit in his garage. Not our problem, the HOA basically told him before slapping him with a lawsuit. After a protracted legal battle, he has since won the right to park his car, but only after two years and $200,000 in legal fees.

While foreclosure is an increasingly real threat to homeowners, few expect to lose their house based on gardening infractions. But that’s exactly what happened to a Rancho Santa Fe, Calif., resident who planted too many roses on his property. After $70,000 in fees, he lost his legal battle against the HOA and ultimately lost his home to the flower debacle.

As seen in a Colbert Report expose, a Bend, Oregon, resident was shocked by her HOA’s rejection of her outdoor clothesline. Her natural drying method was dubbed a hazard, and they began levying fines that totaled nearly $1,000. She eventually took down the offending line, even after the Right 2 Dry movement got behind her.

If you’re a married man in Iowa, the government grants you a special privilege: you’re allowed to bar your mother-in-law from your home. While certainly useful to men trying to ditch their spouse’s mom, this law does not extend to women.

5. Only use sanctioned paint.

What appears to be an inoffensive pale blue house has caused a stir recently in one Georgia neighborhood. Unaware of his HOA’s rules, a homeowner painted his house before having the color officially approved by his board. And with a $25 per day fee levied every day his house bares the offending hue, he’s already racked up $6,800 in fines on top of legal fees.

6. No service dog for the hearing impaired.

A Fort Collins, Colo., HOA fined a hearing-impaired resident for keeping Pookee, her Pomeranian service dog. The HOA even threatened to put a lien on the property. All this despite the fact that Fair Housing Act requires condo and home owner associations to make reasonable accommodations in their procedures and rules to allow a person with disability to reside in a unit. This includes allowing service animals.

Have an issue related to service animal? Contact your local HUD office or local or state human rights agency.

7. Don’t use ‘inconsistent’ shingles.

As if it wasn’t tragedy enough when a plane fell out of the sky destroying a Sanford, Fla., man’s home, his HOA then challenged his rebuilding efforts. It threatened litigation because the shingles and elevation in his new house’s plans didn’t match his neighbors’.

Bending the rules

If you fight the law, you may lose. But there are ways to work with the restrictions of a HOA and still get your way. The first line of defense is to make sure you understand the HOA or condo association rules before you purchase the property.

If, after you move in, you’d like your home’s appearance to differ from that of your neighbors, you’ll need to submit a “variance” form of request. This request can be accepted or rejected at the board’s will, so it’s good to alert them early in your planning process. One tip to gain HOA support? Understand the challenges and perspective of HOAs, follow the rules to a tee, and offer to help them gain community support for their initiatives. Maybe even run for office. If you can’t beat ‘em, you might as well join ‘em.

What’s the strangest local government or HOA rule you’ve ever heard of?