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

Home Forums Design Issue with text inside of division with fixed width but auto height

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #269164

    So this is my issue I can’t wrap my head around.

    First, please look at these two pictures to understand my problem better:

    Basically, when I put text inside of division and define ONLY it’s width, it will start doing strange things when trying to zoom in.
    I cannot explain why is it doing what it’s doing:

    1.) why does Android Browser change division width when it’s fixed, but only when height is not defined (auto)?
    2.) why does Chrome Browser increase font size, again, only when width is fixed and height isn’t specified?

    But when both width and height are specified, then both browsers work as intended.
    Why is that?

    Please help me figure this out..


    Unfortunately we can’t diagnose images. We need to see code. Please recreate the issue in a CodePen to help us firstly see the problem, and then comment on it.


    Sure thing.

    I’m not sure if this is the right way to share in CodePen, but here. Hope it works:

    So when I don’t define DIV HEIGHT and open these HTML files in Android Web Browsers, they start to mess things up.


    So turns out, that in Android MIUI Browser if I disable JavaScript, it’ll stop changing division’s set width, when there’s text inside.
    But since I haven’t learned anything about JavaScript yet, I have no idea how to prevent that.

    Now when it comes to Chrome Browser, it doesn’t do that, but the text is much larger than on PC or Android Browser…
    Even when is font set to 12px.

    How in the world will I be able to make a site that will look the way I want on any device at this rate??

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design’ is closed to new topics and replies.