Why won't the Android browser span this paragraph over the full browser width?

后端 未结 8 1974
无人及你
无人及你 2020-12-24 13:26

The Problem:

\"enter


The Question

The paragraph will fill th

相关标签:
8条回答
  • 2020-12-24 14:06

    I don't tink this is a bug: my Android 4 changes the width of p if I move from portrait to landscape and if I double-click to zoom, it fits exactly the screen.

    Keep in mind that the viewport for mobiles often shows roughly 1000px (may be 1024) in width, while the screen is smaller; when you say 100% the browser may use the screen width, not the viewport width. This allow you to dblclick to text automatically fit the paragraph to the screen without reflowing. Probably this behaviour is restricted to the P tag and this may be considerated consistent to the semantic of p.

    0 讨论(0)
  • 2020-12-24 14:12

    This is not a CSS issue,

    body, p { width: 100%; }
    

    Doesnt seem to work, please see this screenshot.

    However if you apply a background to the paragraph, it does then span fully.

    This seems like a hack but I cant find any other solution.

     background: url('');
    

    Not sure if that will display a missing image x icon on some browsers,
    alternatively you could use an empty png.

    0 讨论(0)
提交回复
热议问题