A search for neutral Higgs bosons in proton-proton collisions at the LHC at a center-of-mass energy of 7 TeV is presented. The results are based on a data sample corresponding to an integrated luminosity of 1.1/fb recorded by the CMS experiment. The search uses decays of the Higgs bosons to tau pairs, including the cases where the Higgs boson is produced in association with a b-quark jet (MSSM search) or two forward jets from vector boson fusion Higgs boson production (SM search). No excess is observed in the tau-pair invariant-mass spectrum. The resulting upper limits on the Higgs boson production cross section times branching fraction to tau pairs, as a function of the pseudoscalar Higgs boson mass, yield stringent new bounds in the MSSM parameter space.