Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Text paragraph width not 100% of div on AppleWebKit/537.36

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #239208
    xms
    Participant

    This issue might have something to do with zoom level. It happens on AppleWebKit/537.36.

    Sometimes the width of a text paragraph (p tag) is not 100% of the width of its parent div. Why is that so?

    When a p tag has background-color:#FFFFFF, the width is 100%, but if there is background-color:transparent or no background-color, the width is not 100%.

    Help me, please.

    <html>
    
    <head>
    <title>Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
    <meta http-equiv="Content-Language" content="fi" />
    </head>
    
    <body style="background-color:blue">
    <div style="width:600px; margin-left:auto; margin-right:auto; background-color: #FFFFFF;">
    <p>This width is not 100% - This width is not 100% - This width is not 100% - This width is not 100%</p>
    
    <p style="background-color:transparent">This width is not 100% - This width is not 100% - This width is not 100% - This width is not 100%</p>
    
    <p style="background-color:#FFFFFF">This width is 100% - This width is 100% - This width is 100% - This width is 100%</p>
    </div>
    </body>
    
    </html>
    
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.