Answer:
If neither of the child's parents are able or willing to care for the child in a safe, loving environment, the grandmother can petition the court for custody of the child. You will need to retain an attorney, and you will also have to provide proof that the parent(s) are not either willing or able to care and provide for the child.
You can also petition for the court to award child support to be paid to you by one or both parents if you do become the legal guardian of the child, as well as requesting that they maintain medical insurance on the child.