I'm having trouble with a simple CSS-Layout. It works on desktop browsers but not on iPhone's Mobile Safari. Using style="float:right" seems to conflict with automatic font size adjustments made by Mobile Safari. The following code works fine on the desktop but on the iPhone "Left" and "Following text" are much larger than "Right":
Left<span style="float:right">Right</span>
<p>Following text</p>
It seems like Mobile Safari's auto-resizing isn't touching the floated word, only the others. As stated here, I could add -webkit-text-size-adjust: 100%
like so:
<body style="-webkit-text-size-adjust: 100%">
Left<span style="float:right">Right</span>
<p>Following text</p>
</body>
but I would like to preserve Mobile Safari's smarts regarding font size and readability. And I am trying to avoid writing special layouts for different screen sizes.
So is there a more iOS-friendly way to left- and right-align words in the same line of text?