This is the nature and dreaded reality of web design. Everyone thinks they know what they’re doing. A client may hire you to design their website but occasionally all they were really looking for is someone who knows how the code works. This is a very frustrating experience. The client is usually creating something hideous and you want to save them but they won’t listen. Some have chosen not to take on or cancel contracts with clients like these. Some are stuck because their client is the company that provides them with a weekly paycheck.
Here is a post that describes this very frustrating feeling perfectly. http://theoatmeal.com/comics/design_hell
What would you do in a situation like this?