can a function be continuous when it has horizontal assymptote

Yes, of course. Check out the hyperbolic tangent function, tanh (x).