Can a federal law be passed by ballot

I know laws are written and enacted by the legislative and executive branch, and that the judicial branch can overturn laws.

I think the judicial branch can create new laws if doing so is necessary to uphold the constitution, is that correct? Like if they find segregation unconstitutional, they can mandate new laws to fight this issue. Is that true? Or can they only overturn segregation laws, not demand laws to fight this issue be enacted?

Aside from that, can the public pass a federal law solely by doing ballot measures which get 51% of the vote?

There is no provision in the Constitution to pass a law via ballot measures.

Also if the Supreme Court finds something unconstitutional, it only strikes down the unconstitutional law. They cannot dictate laws to regulate their ruling, other than to strike them down if they are challenged and found unconstitutional.

There is a book on passing public financing of elections (whose name and author I cannot remember) who said that something akin to ballot measures could be used to create a federal law regarding how elections are financed. I don’t recall his exact method but I think you needed a ballot measure in 2/3 of states.

No. The Constitution grants all federal legislative powers to Congress.

Sounds to me like you’re thinking of the power to amend the Constitution by means of a constitutional convention, bypassing Congress.

That is, Court can say: “A law that flat-out bans [abortion/personal ownership of a firearm/private campaign donation/labor organizing] altogether or limits it to the point of constructive prohibition is unconstitutional.” Then it becomes up to the legislative bodies to go back to the drawing table and figure out what regulation will not run afoul of that ruling, which in turn may be challenged again…

But courts can mandate certain actions. For instance, courts (Federal courts?) have ruled that California’s prison system is overcrowded, and have mandated prisoner releases to fix the problem.

This isn’t a law, but it is a mandate, a command for a government agency to “do something” to correct a problem. The same was true for integration of schools: the courts didn’t just say, “You can’t segregate,” but said, “You must integrate.”

Such directives have much the appearance of laws, but are not, formally speaking, laws. For one thing, they are only binding on government agencies, not on individual citizens. Laws (per se) can be binding on the citizens.

Right – they can issue an order (not a law) to the governmental bodies saying “stop doing it wrong, start doing it right” and what compliance will satisfy the Court. They can also rule on under what conditions a law or its application stays on the fair side of the constitutionality line, e.g. when do you rule a published material is “obscene” vs. what is First Amendment-protected.

The closest thing is on demand of 2/3 of state legislatures, Congress “shall” call a convention for the purpose of proposing amendments to the constitution. What happens of Congress doesn’t act?

No, you are thinking of powers in state constitution’s, Referendum and Initiative.

This is a remedy the courts can order to correct a specific wrong, due to a specific case brought to them.

If a person (or the US Attorney General on behalf of citizens) sues because a specific right is being violated (i.e. to equal treatment by the education system on the basis of race) then the court can issue whatever it needs to make it right; they can order monetary payments, then can mandate that the agencies affected produce a plan which corrects the injustice (i.e. schools effectively segregated by school board boundaries? Bus students to create a mix). It can do the same for private individuals or companies sued for some case, but generally the simplest remedy is cash. They can issue an injunction “you are forbidden to do X” which simplifies and speed the remedy for repeat offences.

Note all these are civil lawsuits, not criminal prosecutions. A person in a criminal conviction might get an order too - i.e. “For hacking, you get 2 years in jail, then 4 years probation during which you are forbidden to use a computer.”