I imagine he meant it to be more lighthearted than it came off, and wouldn't read much into it.
No dress code = dress how you like. If you like to dress up in slacks and a dress shirt, then so be it.
Don't change your preferences for the CEO. Be confident and stand behind your convictions. If he doesn't respect that - you're going to have muuuuch bigger problems.