IDs are unique identifiers allowed only once per page. If you re-use an ID on the same page, your code is invalid. Better to apply re-usable CLASSES (pre-pended by a dot) instead of unique IDs (pre-pended by #).
For all the rest -- instead of sending us your code errors -- please provide a link to the online page so we have some context to follow. We don't know if you're using a proper doc type or what else may be going on.
Thanks,
Nancy O.