Can you post the full model number please.
Ok the first thing to do when a door isn't closing is remove both top and bottom baskets and then try and close the door. As sometimes you can get something jammed behind the baskets so it stops them from going fully back. Its usually the top basket as a wheel can fall off and cause this.
But with after the baskets remove it still isn't closing then its going to be a faulty door latch. If you have removed the front panel then look at the door latch and see if the hook has flipped backwards. If it has then try and reset it by flipping it forwards and see if this does it. If not then the door latch will need to be replaced to cure this.
Ok if its not the baskets or the door latch then its something to do with the door hinge as its only them that will affect the door.
For this you need to pull the dishwasher out and remove both side panels. From there you will see the door hinge and there is a bracket which has string either ends. If this breaks it jams up in the hinge and can stop the door from closing.
So as the latch and baskets are fine then the fault will be some were on the hinges on the side.
Nice one glad to hear you got it sorted and thanks for letting me know how it went.
Ok double check the hinges and try and bend them out but if that isn't working then the hinges will more then likely need to be replaced here.
Thanks for your help it was usefull to speak to someone with knolege about dishwashers. I haven't fixed it so I think I'll buy a new one