  We say that a $q$-ary length $n$ code is \emph{non-overlapping} if the set of
non-trivial prefixes of codewords and the set of non-trivial suffices of
codewords are disjoint. These codes were first studied by Levenshtein in 1964,
motivated by applications in synchronisation. More recently these codes were
independently invented (under the name \emph{cross-bifix-free} codes) by
Baji\'c and Stojanovi\'c.
  We provide a simple construction for a class of non-overlapping codes which
has optimal cardinality whenever $n$ divides $q$. Moreover, for all parameters
$n$ and $q$ we show that a code from this class is close to optimal, in the
sense that it has cardinality within a constant factor of an upper bound due to
Levenshtein from 1970. Previous constructions have cardinality within a
constant factor of the upper bound only when $q$ is fixed.
  Chee, Kiah, Purkayastha and Wang showed that a $q$-ary length $n$
non-overlapping code contains at most $q^n/(2n-1)$ codewords; this bound is
weaker than the Levenshtein bound. Their proof appealed to the application in
synchronisation: we provide a direct combinatorial argument to establish the
bound of Chee \emph{et al}.
  We also consider codes of short length, finding the leading term of the
maximal cardinality of a non-overlapping code when $n$ is fixed and
$q\rightarrow \infty$. The largest cardinality of non-overlapping codes of
lengths $3$ or less is determined exactly.
