Mike
Mike

Reputation: 49

having trouble with <pre> <code> on mobile

This issue has been bothing me for a while.

On this site http://www.mikedemar.com/timeline/

I have noticed that the content wraped in the tags goes outside the white boxes when viewing on mobile devices specifically iPhone.

Any ideas on how to fix this?

Thanks in advance.

Upvotes: 0

Views: 744

Answers (1)

ryanve
ryanve

Reputation: 52591

CSS like this provide a good base:

pre, code, kbd { -moz-tab-size:4; -o-tab-size:4; tab-size:4; }
pre { white-space:pre-wrap; word-wrap:break-word; overflow:auto; }

Upvotes: 4

Related Questions