Despite moral objections to slavery, as well having it outlawed for decades by that point, both Britain and France saw value in an independent CSA. The right justification and both nations would have been content to at least aide the Confederacy more directly.
France was always more of a possibility of outright military intervention than Britain, out of a belief that a divided US wouldn't have the means to oppose Napoleon III's imperial designs in Mexico and South America (now with a potential Confederate ally to aide in the process). However France would only have intervened if it was part of a joint-venture with Britain that would have given it a veneer of an international mediation. Similar to the French invasion of Mexico initially.
In Britain's case, many in the British government and upper-classes were sympathetic to the South out of a sense of shared cultural connections, a distaste of rampant American democracy, and that a divided US would kneecap a serious long-term rival to Britain. But actual intervention was another thing entirely, especially as it put holdings like Canada in danger.
A possible mediation offer and intervention was considered around 1862 when the Emancipation Proclamation was declared (the mediation offer being in conjunction with France and, they hoped, Russia also) but events closer to home in Europe killed any momentum it had.