We discuss alignment properties of nematic liquid crystals on surfaces that contain homeotropic and planar alignment areas on the same surface substrate. The basic idea is to locally pattern homeotropic agents (silane) on surfaces that usually lead to planar alignment (SiO2). The patterns used are linear gratings with periods smaller than 1 μm, which were produced via nanoimprint lithography on glass substrates. As the main parameters the period of the gratings and the coverage ratio between silane and SiO2 areas were varied. It is shown that simultaneous control of both polar and azimuthal orientation of liquid crystal is possible using the chemical nanopatterns as alignment layer. While the liquid crystal azimuthal angle orients along the direction of the silane lines, the polar orientation depends on the coverage ratio of the homeotropic/planar surface potential areas. Simulations for different configurations are used to explain experimental findings.