delivered the opinion of the court:
Appellant was convicted of violating an ordinance of the town of Wellington. The cause was tried to a jury, with the result that he was found guilty, and a fine of $300.00 assessed by the jury. No question is raised regarding the authority of the jury to assess the fine, which was afterwards imposed by the court. At the trial counsel for appellant objected to the introduction of the ordinance under which he was being proceeded against upon grounds among which was one to the effect that it was void because it contained provisions 'not within the power of the town to enact. The provisions referred .to related to the penalties prescribed for its violation as embraced in see. 2, which is as follows:
“ Any person who shall in any manner violate any of the provisions of this ordinance shall, upon *80conviction thereof, be fined for each offense three hundred dollars, or imprisoned in the town jail or county jail not more than ninety days.”-
The court ruled that the provision relating to imprisonment was beyond the power of the town authorities to enact, but held that this defect did not invalidate the provision relating to a fine. With the imprisonment clause eliminated, the ordinance was admitted in evidence over the objection of appellant. His counsel here say that under the assignment of errors the only question to consider is whether the ordinance as passed, recorded, and published, was the ordinance introduced in evidence in this case after the court had eliminated the imprisonment provision. In support of this contention their argument is to the effect that when the authorities of the town of Wellington passed the ordinance in question, and had it recorded and published as provided by statute, the court on the trial of the cause had no authority to eliminate a part of it and admit what remained as the ordinance of the town, for the reason that the ordinance as passed, recorded and published was the only authority upon which an action for its violation could be based. The ground upon which the trial court eliminated the imprisonment clause was that the town authorities had no power to provide for such a penalty. Whether or not this ruling was correct is immaterial. In construing statutes it has often been determined that the fact that a part of a statute is unconstitutional does not vitiate the part which is good, if the good and bad can be clearly separated.—Carpenter v. People, 8 Colo. 116. This rule applies when the portion of the statute remaining after the void portion is stricken is complete within itself, and does not depend upon the part eliminated.—People ex rel. v. Hall, 8 Colo. 485.
*81An ordinance, like a statute, may be valid in part and void in part, and the rule applicable when void only in part is the same as in the construction of statutes under similar circumstances.—City of Durango v. Reinsberg, 16 Colo. 327. In the case at bar the ordinance was complete within itself after the provision relating to imprisonment was stricken out, and that which remained was in no manner dependent upon the part eliminated.
It is also urged by counsel for appellant that he was entitled to the exercise of the sound discretion of the jury as to the penalty to be inflicted upon him, of which right he was deprived by the admission of the ordinance without the alternative clause. It may be doubtful, as suggested by counsel for appellee,, whether appellant can have this question considered, or the one previously discussed, for the reason that the ruling of the trial court was the result of appellant’s attack upon the ordinance; and hence, the rule to the effect that a party cannot complain of an error which he invites, would be applicable; but, waiving this, it is clear that appellant was not prejudiced. The ordinance as introduced under the ruling of the trial court only provided for a fine. As passed, it provided in the alternative for imprisonment. Certainly, appellant was not prejudiced in being found guilty of violating an ordinance wherein the penalty imposed was limited to a fine, instead of one where the penalty in the alternative could have been imprisonment. Ñonprejudicial error will not work a reversal on appeal.
The judgment of the county court is affirmed.
Affirmed.
Chief Justice Steele and Mr. Justice Bailey concur.