This paper deals with a finite element method involving Petrov-Galerkin method with quintic B-splines as basis functions and septic B-splines as weight functions to solve a general fourth order boundary value problem with a particular case of boundary conditions. The basis functions are redefined into a new set of basis functions which vanish on the boundary where the Dirichlet type of boundary conditions are prescribed. The weight functions are also redefined into a new set of weight functions which in number match with the number of redefined basis functions. The proposed method was applied to solve several examples of fourth order linear and nonlinear boundary value problems. The obtained numerical results were found to be in good agreement with the exact solutions available in the literature.