Prickly em sizing issue with Google Fonts

Google Fonts and em Auto Sizing

Hello Sitepoint, Paul, Ronpat, everybody. Okay firstly I am working on a SmartPhone with a 1080px by 2097px viewport and I’ve been trying to embrace the concept of em sizing. Below is a stripped-down version of the border radius template Paul helped me to get working and in it I’m using a few different Google Fonts.

What’s happening is when I turn my SmartPhone to landscape (wide) mode to enlarge the display the font in two of my styles – ‘.thing3’ and ‘.thing4’ – does not enlarge like the rest of the page. This is my first experience of Google Fonts and this is an issue I keep running into. I thank you in advance – anyone – for helping me diagnose what in my code is blocking these two little bits of text from enlarging like the rest of the page.

—s

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com"> 
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet"> 
<link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

<title>autosize &#7172; semicodin</title>

<style>

body {
        margin: 3.13em 0 0;
        padding: 0;
        width: 100%;
        font-size: 1em;
        line-height: 1;
        font-family: 'solway', cursive;
}
#twocolumns {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 88%;
        margin-left: 6%;
        margin-right: 6%;
        margin-bottom: 1.88em;
}
#column-a {
        width: 40%;
}
#column-b {
        width: 60%;
}
#rndbdr1 {
        border-radius: 1.56em;
        border: .63em solid black;
        padding: .56em;
        width: auto;
}
#rndbdr2 table {
        width: 100%;
        border-bottom: none;      /* do not remove */
}
#rndbdr2 th {
        border-radius: .31em .31em 0em 0em;
}
#rndbdr2 tr:last-child td {
        border-bottom: none;      /* do not remove */
}
#rndbdr2 {
        background-color: white;
        border-radius: .63em;
        border: .31em solid black;
        padding: 0em;
        color: black;
        border-collapse: collapse;
        width: auto;
        margin-top: .94em;
        margin-left: 0em;
        margin-right: 0em;
}
table, th, td {
        border-collapse: collapse;
        border-bottom: .14em solid black;
}
th {
        background-color: #e3f0ff;
        border-bottom: .14em solid black;
        padding: .31em;
        border-collapse: collapse;
        width: 100%;
        margin-left: 0em;
        margin-right: 0em;
        color: black;
        text-align: center;
        font-size: 1.63em;
        line-height: 1.05;
        font-style: italic;
        font-weight: bold;
        font-family: 'crete round', cursive;
}
table .leftcol {
        padding-top: .06em;
        text-align: right;
        color: #686868;
        font-size: 1.06em;
        line-height: 1;
        margin-left: 0px;
        margin-right: .13em;
        font-weight: 400;
        font-family: 'fira extra condensed', sans-serif;
}
table .rightcol {
        padding-top: .06em;
        text-align: left;
        color: black;
        font-size: 1.06em;
        line-height: 1;
        margin-right: 0em;
        font-weight: 600;
        font-family: 'fira extra condensed', sans-serif;
}

.sol300 {margin: 1.88em; font-size: .75em; line-height: 1; font-weight: 300; font-family: 'solway', cursive;}
.sol400 {margin: 1.88em; font-size: .75em; line-height: 1; font-weight: 400; font-family: 'solway', cursive;}
.sol600 {margin: 1.88em; font-size: .75em; line-height: 1; font-weight: 600; font-family: 'solway', cursive;}
.sol700 {margin: 1.88em; font-size: .75em; line-height: 1; font-weight: 700; font-family: 'solway', cursive;}

#thingid {
        margin-top: 50px;
        margin-left: 5%;
        margin-right: 5%;
        color: black;
        text-align: left;
        font-size: .69em;
        line-height: 1;
        font-weight: 500;
        font-family: 'solway', cursive;
}
.thing1 {
        text-align: left;
        margin-bottom: .75em;
        color: #535353;
        font-size: 1.63em;
        line-height: 1;
        font-weight: 400;
        font-family: 'roboto', sans-serif;
}
.thing2 {
        text-align: left;
        margin-bottom: .75em;
        color: #535353;
        font-size: 1.63em;
        line-height: 1;
        font-weight: 400;
        font-family: 'roboto', sans-serif;
}
.thing3 {
        color: green;
        text-align: left;
        font-size: .69em;
        line-height: 1;
        font-weight: 500;
        font-family: 'solway', cursive;
}
.thing4 {
        width: 500px;
        border-bottom: .25em dotted #91c8ff;
        color: crimson;   
        text-align: left;
        margin-bottom: 1.88em;
        font-size: .69em;
        line-height: 1;
        font-weight: 700;
        font-family: 'solway', cursive;
}
.groovyb {
        width: 100%;
        padding: 0;
        margin-top: 1.3em;
        margin-bottom: 1.88em;
        border-top: .88em groove dodgerblue;
}

</style>
</head>

<body>
  <div id="twocolumns">
    <div id="column-a">
      <div class="thing1" style="margin-top: 1.19em">
        duis lobortis pellentesque risus. aenean ut tortor imperdiet dolor scelerisque
        bibendum. fusce metus nibh, adipiscing id, ullamcorper at, consequata, nulla.
      </div>
    </div>

    <div id="column-b">
      <div id="rndbdr1">
        <div class="thing2">
          phasellus placerat purus vel mi. in hac habitasse platea dictumst.
        </div>

        <div id="rndbdr2">
          <table>
            <thead>
              <tr>
                <th colspan="2">Lorem Ipsum sit amet, consectetuer<br />
                Donec iaculis nec, gravida ac cursus</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td class="leftcol">lorem ipsum:</td>

                <td class="rightcol">fusce tincidunt</td>
              </tr>

              <tr style="border-bottom: none">
                <td class="leftcol">lorem ipsum:</td>

                <td class="rightcol">fusce tincidunt</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>

  <div class="groovyb"></div>

  <div id="thingid">
    <div class="thing3">
      Lorem Ipsum consectetuer adipiscing elit.<br />
      <br />
      Mauris vestibulum, felis et egestas ullamcorper.<br />
      Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu
      egestas nisl non justo. Fusce tincidunt, lorem nev dapibus consectetuer, leo orci
      mollis ipsum, eget suscipit eros purus in ante.:<br />
      <br />
      At ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non,
      venenatis vel, lorem. Sed ultricies cursus lectus. In id magna sit amet nibh
      suspicit uismod. <span class="dblue">sed lacinia. Suspendisse potenti.</span> .
      Curabitur pede ede, molestie id, blandit vitae, varius ac, purus.
    </div>

    <div class="thing4">
      Aenean aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos
      hymenaeos. Integer velit mauris, convallis a congue sed, placerat id, odio. Etiam
      venenatis tortor sed lectus. Nulla non orci. In egestas porttitor quam. Duis nec
      diam eget nibh mattis tempus. Curabitus accumsan pede id odio. Nunc vitae libero.
      Aenean condimentum diam et turpis.
    </div>
  </div>
</body>
</html>

em sizing is based on the size of the base font of the machine being run on (computer, phone, etc). It has nothing to do with window width. You CAN change a font size using the calc function, but that can get out of hand quickly if you don’t catch the boundaries properly.

Do you have a different media query for the wider width? If so, you can set a different size in there.

2 Likes

There are a number of things consider here.

First off are you using the meta viewport tag? We have mentioned this before and if you are not using the meta viewport tag then all bets are off as the browser will guess the page is 980px (approx) and then scale it down to fit your 414px viewport. Even though your phone is 1080px resolution its physical width as far as css is concerned will be about 414px.

Secondly when you switch to landscape some phones will enlarge the text by default (read the link above for a full explanation) and it is best to apply text-size:adjust:100% to the body to stop this happening and to use the viewport meta tag at all times.

Suffice to say that you should never create a mobile site without using the viewport meta tag.

Regarding your css then as Dave said above em units will compound and your thing3 and thing4 are inside of thingid (please use better names :)). The element thingid has a font-size of .69em and thing3 also has font-size .69em which means thing3 will be .69em of .69em. That equals 7.6px (assuming a base of 16px as in most cases). However as you don;t have a meta viewport tag that 7.6px ‘may’ be scaled even further so that the page fits.

Combine this with the fact that some browsers have a minimum font-size display the chances of anything rendering properly will be close to zero.

If you use rems instead of ems you will avoid the compounding issue as rems always refer to the base size and not the size of the immediate parent.

You must use the meta viewport tag which will tell the browser that you are handling the display and not to let it scale the page ad hoc.

Don’t confuse your phones resolution with the actual css pixels that are used. Your phone maps a number of its pixels into one css pixel. the css width of your phone is likely 414px as I said above.

4 Likes

Dave Maxwell and Paul O’Brien, Gentlemen I thank you for helping me with this. It has been an eye opener to take the little journey your links sent me on and I’m only getting around to thanking you now because I’ve been reading. And reading.

I’m going to post my code but what is amazing to me is this: I got this working without the Viewport meta tag. In fact, I didn’t even realize I had left it out completely until just now, getting ready to post my code. I used Dave’s link to read up on Viewports. But I also clicked this link –
https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust

– and toward the bottom it stated that of the major browsers only Chrome recognized the text-size-adjust property. Well it annoyed me. I didn’t come all this way just to learn I would be constrained to defining my fonts pixel-by-pixel. So I ran this up the flagpole and to my amazement it worked!

html, body {
        text-size-adjust: 100%;

The whole code follows. I will return to my thread to discuss the viewport meta tag Paul in a few days. Okay, thing3 might be is really bad Paul lol. You uh, might not like the new ones. I will return to continue this thread because coding for mobile is like hitting an iceberg and I want to research some things about my LG Stylo 4 SmartPhone first. It’s . . .

The Big Lesson

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="preconnect" href="https://fonts.googleapis.com"> 
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet"> 
<link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">

<title>Autosizing for Mobile &#7172; semicodin</title>

<style>

html, body {
        text-size-adjust: 100%;
        margin: 3.13rem 0 0;
        padding: 0;
        width: 100%;
        font-size: 16px;
        line-height: 16px;
        font-family: 'solway', cursive;
}

#twocolumns {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 1.88rem;
}
#column-a {
        width: 41%;
}
#column-b {
        width: 59%;
}
#rndbdr1 {
        border-radius: 1.56rem;
        border: .63rem solid black;
        padding: .56rem;
        width: auto;
}
#rndbdr2 table {
        width: 100%;
        border-bottom: none;      /* do not remove */
}
#rndbdr2 th {
        border-radius: .31rem .31rem 0rem 0rem;
}
#rndbdr2 tr:last-child td {
        border-bottom: none;      /* do not remove */
}
#rndbdr2 {
        background-color: white;
        border-radius: .63rem;
        border: .31rem solid black;
        padding: 0rem;
        color: black;
        border-collapse: collapse;
        width: auto;
        margin-top: .94rem;
        margin-left: 0rem;
        margin-right: 0rem;
}
table, th, td {
        border-collapse: collapse;
        border-bottom: .14rem solid black;
}
th {
        background-color: #e3f0ff;
        border-bottom: .14rem solid black;
        padding: .31rem;
        border-collapse: collapse;
        width: 100%;
        margin-left: 0rem;
        margin-right: 0rem;
        color: black;
        text-align: center;
        font-size: 1.63rem;
        line-height: 1.05;
        font-style: italic;
        font-weight: bold;
        font-family: 'crete round', cursive;
}
table .leftcol {
        padding-top: .06rem;
        text-align: right;
        color: #686868;
        font-size: 1.06rem;
        line-height: 1;
        margin-left: 0px;
        margin-right: .13rem;
        font-weight: 400;
        font-family: 'fira extra condensed', sans-serif;
}
table .rightcol {
        padding-top: .06rem;
        text-align: left;
        color: black;
        font-size: 1.06rem;
        line-height: 1;
        margin-right: 0rem;
        font-weight: 600;
        font-family: 'fira extra condensed', sans-serif;
}

.sol300 {margin: 1.88rem; font-size: .75rem; line-height: 1; font-weight: 300; font-family: 'solway', cursive;}
.sol400 {margin: 1.88rem; font-size: .75rem; line-height: 1; font-weight: 400; font-family: 'solway', cursive;}
.sol600 {margin: 1.88rem; font-size: .75rem; line-height: 1; font-weight: 600; font-family: 'solway', cursive;}
.sol700 {margin: 1.88rem; font-size: .75rem; line-height: 1; font-weight: 700; font-family: 'solway', cursive;}

#contd {
        margin-top: 2.75rem;
        margin-left: 5%;
        margin-right: 5%;
        color: black;
        text-align: left;
        font-size: .69rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'solway', cursive;
}
.intro {
        text-align: left;
        margin-bottom: .75rem;
        color: #535353;
        font-size: 1.63rem;
        line-height: 1;
        font-weight: 400;
        font-family: 'roboto', sans-serif;
}
.major {
        text-align: left;
        margin-bottom: .75rem;
        color: #535353;
        font-size: 1.63rem;
        line-height: 1;
        font-weight: 400;
        font-family: 'roboto', sans-serif;
}
.then {
        color: green;
        text-align: left;
        font-size: 1.25rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'solway', cursive;
}
.dotty {
        width: 29.34rem;
        border-bottom: .25rem dotted #91c8ff;
        color: black;   
        text-align: left;
        margin-top: 1em;
        margin-bottom: 1.88rem;
        font-size: 1.25rem;
        line-height: 1;
        font-weight: 700;
        font-family: 'solway', cursive;
}
.groovyb {
        width: 100%;
        padding: 0;
        margin-top: 1.3rem;
        margin-bottom: 1.88rem;
        border-top: .75rem groove dodgerblue;
}

</style>
</head>

<body>
  <div id="twocolumns">
    <div id="column-a">
      <div class="intro" style="margin-top: 1.19rem">
        Duis lobortis pellentesque risus. aenean ut tortor imperdiet dolor scelerisque
        bibendum. fusce metus nibh, adipiscing id, ullamcorper at, consequata, nulla.
      </div>
    </div>

    <div id="column-b">
      <div id="rndbdr1">
        <div class="major">
          Phasellus placerat purus vel mi. in hac habitasse platea dictumst.
        </div>

        <div id="rndbdr2">
          <table>
            <thead>
              <tr>
                <th colspan="2">Lorem Ipsum sit amet, consectetuer<br />
                Donec iaculis nec, gravida ac cursus</th>
              </tr>
            </thead>

            <tbody>
              <tr>
                <td class="leftcol">lorem ipsum:</td>

                <td class="rightcol">fusce tincidunt</td>
              </tr>

              <tr style="border-bottom: none">
                <td class="leftcol">lorem ipsum:</td>

                <td class="rightcol">fusce tincidunt</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>

  <div class="groovyb"></div>

  <div id="contd">
    <div class="then">
      Lorem Ipbr /m consectetuer adipiscing elit.<br />
      <br />
      Mauris vestibulum, felis et egestas ullamcorper.<br />
      Mauris vestibulum, felis et egestas ullamcorper, purus nibh vehicula sem, eu
      egestas nisl non justo. Fusce tincidunt, lorem nev dapibus consectetuer, leo orci
      mollis ipsum, eget suscipit eros purus in ante:<br />
      <br />
      At ipsum vitae est lacinia tincidunt. Maecenas elit orci, gravida ut, molestie non,
      venenatis vel, lorem. Sed ultricies cursus lectus. In id magna sit amet nibh
      suspicit uismod. <span class="dblue">sed lacinia. Suspendisse potenti</span> .
     
    </div>

    <div class="dotty">
&ldquo;Dotty&rdquo; the border needs to span<br />
      the width of the text <span style="font-weight: 700; color: blue;">even if the text expands.</span>
    </div>
  </div>
</body>
</html>

Just FYI that rule will equate to a top margin of 6.26rem as you are applying 3.13rem to the html and then 3.13 rem to the body element resulting in a total gap of 6.26rem. It’s not a problem but just to be aware that is what you are saying.:slight_smile:

Hello again Paul, Dave, everybody. Well first I want to say that the little shell I uploaded here may have escaped the hangman but my actual document most certainly did not: You have to have that meta tag. Period. For anyone new to the thread I am composing for an LG Stylo 4 SmartPhone and we’re talking about the meta name="viewport" header tag.

My LG has a display of 1080px by 2097px . . . er, maybe. Because as Paul has explained this is Wonderland and you’re down the rabbit hole once you embark on the boutique sub specialty of “responsive coding” (or for those of us preferring use of the actual noun: mobile phones).

My LG was all over the map on this tag. I tried a number of values in the string but ultimately gave up and just entered my reported width. Here then is Viewport on my phone:

<meta name="viewport" content="width=1080, initial-scale=1">

The very first thing that happened once I put this tag in was a physical realignment of my entire document that was breathtaking to behold. I only realized just then that every previous revision of this intricate document had been displaying in an environment so volatile I marvel I got it to display the same way twice in one day!

I did try Paul’s resolutions but ended up using 1080px because it looked and acted best with that value. Paul, everything improved. All these weeks of confusion, wondering what the hell was wrong with the font sizing, resolved. What happens now is that the minute you open the file you have a zoomed-in view. Pinch it to 100% and the whole page displays. Turn the phone and every pixel enlarges precisely (I was most surprised that my little dotted border “Dotty” tracked the length of text she sits beneath perfectly).

In the course of coding this document I was determined to use ems. But that was a teachable moment all its own because I discovered rems and in the course of coding a little Conversion Chart produced my first Flexbox from scratch using Chris Coyiers’s Guide to Flexbox at

https://css-tricks.com/snippets/css/a-guide-to-flexbox/
and it validates woo hoo! Here it is on Codepen:
https://codepen.io/semicodin/pen/ZErYNvm

I have reached 2 conclusions and I want to hear both (all) of your opinions:

First, use REMS not EMS. In fact why would anyone in their right mind yield control over their font sizing to the caprice of a parent cell?! Nail that bad boy down and put an adult in the room:

html, body {
text-size-adjust: 100%;
font-size: 16px;
line-height: 16px;

Good grief.

Second, the following Mozilla Developer page
https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust
on this issue states that Firefox and most of the major browsers do not recognise %-based coding. TRY IT ANYWAY because from my vantage point it’s madness to do this on a pixel-by-pixel basis. Do you agree? Disagree? lmk —s

You should not need to put 1080px anywhere.

Use:
<meta name="viewport" content="width=device-width, initial-scale=1.0">

3 Likes

No you misunderstood what I was saying.:slight_smile: The 414px will most likely be the css width of your phone when you add the correct viewport meta tag.

You need the viewport meta tag that @Archibald showed you above. Don’t use any other version! I have shown it to you in other threads so thought you would have remembered. :wink:

You should not have to pinch and zoom to read the site. That’s not how it’s done. The text should be readable straight away and pinching and zooming should be unnecessary.

If you don’t use the viewport meta tag we showed you then you won’t be able to use media queries properly either as they will get triggered at odd sizes because of the scaling factors.

You need to realise that a mobile site is not going to look like a desktop site but just scaled down. That’s not how it works. Look at any well made site to see the difference between small and large screen. Most small screen displays will be one column with more linearised content. You are not going to have 3 columns across on a mobile unless it’s just a couple of words.

In essence it has nothing to do with mobile or desktop but how much space the design needs to render in a readable fashion. You obviously can’t have ten columns at 320px so you adjust the design using media queries to make the design work across all sizes as appropriate.

You can’t just code for your own one device. You need to cater for all devices and screen widths. With a few well chosen media queries and a fluid design you can do this quite easily.

It does take a little to get your head around at first but you have to stop thinking about one device and one resolution unless it’s just for you and no one else:)

3 Likes

When I add

<meta name="viewport" content="width=device-width, initial-scale=1">

the page blows up to a size that warps the content and I cannot get it small enough to fit the screen. I’m sorry but this does not work for me Paul. Is there some other way to express this tag? A character I have out of place?

And just for the record every piece of HTML I write is for my own private use. That has never changed in all the years I have posted to Sitepoint. :face_in_clouds: It will never be hosted anywhere nor seen by anyone but me. I would like the code to use this tag but I’ll revert to my 1080 if there is no other way to express this because it looks great with it.

Ah! The mystery of my 200% top margin is solved! Should I put these four lines in the <body> tag alone?

        margin: 32px 0 0;
        text-size-adjust: 100%;
        font-size: 16px;     /* factor expressed in px setting basis */
        line-height: 16px;  /* factor expressed in px setting basis */
}

As I said above generally the only tag you need is the one we have given you.

However as you say this is for you only then you can basically do what you like but be aware no one else will be able to view unless they have the same set up as you and care to pinch and zoom. You can use your meta tag that matches the resolution for your device and then you get a shrink to fit algorithm but still may get weird behaviours In landscape but may be good enough to satisfy you.

I don’t really see the point of investing time in learning how to do something that for most instances would be wrong unless you also learn how to do it right. Once you understand the implications you can of course do what you like locally but remember when you ask for advice to mention that this is a special case just for you otherwise we will keep pointing you toward best practices rather than addressing your individual concerns.

Note that I am typing this on a small iPhone and don’t need to pinch or zoom to complete this task :slight_smile:

3 Likes

Paul my preference is always to do this the correct way. And I think you know the high esteem I hold your advice in (I don’t think there is anyone whose advice I give greater merit to) and I know how many of us you are helping! How could you possibly remember that my HTML is always going to be little projects that are for my own private use? It’s not like I can point to all of my posts on Sitepoint over the years and say Remember me? when the site changed ownership and my history was purged.

I asked if there was some other way of expressing this tag – fine tuning it if you will – because I believe “responsive coding” is not only the future, it’s going to be the only way we code. SmartPhones are obliging all of us to rewrite the internet, would you not agree? I don’t like it any more than you do! I wish I were at home on one of my three desktop computers – two Windows, and the third a new Linux build I was in the middle of when my infernal hip went out.

No, these phones are not only never going away, their platform is poised to become the one that dominates the internet. All these lovely website pages . . . reduced to a 5” screen. Jesus wept!

This viewport meta tag so completely butchers my code I’m going to do a screenshot for you and display a before and after. There is no resizing of my screen with this tag in place Paul – I can’t even pinch it to zoom out! That’s why I can’t believe there isn’t something I’ve left out. This tag is obviously working for everyone else, Why is it not working for me? is the question I have.

I can use this 1080 hack temporarily to generate the PDF I need it to render as but it is a template: I will have to get viewport working one way or another because I’m only going to have to revisit the issue of its mangled display all over again (probably sooner rather than later). If I haven’t exhausted your – everyone’s – patience I would still like to arrive at a solution, looking at it forensically if necessary. Let me know and I’ll get a comparison screenshot uploaded. Thank you Paul. —s

Redacted Screenshot. The tag

<meta name="viewport" content="width=device-width, initial-scale=1.0">

is the image on the right. The screen cannot be reduced or enlarged. —s

It’s late here so just going offline but can you do me a favour and post the full html and css of the latest version. I realise you may want to remove some content so please replace with dummy text etc.

I’ll be back tomorrow and see what I can deduce from what you posted. :slight_smile:

1 Like

.ONE, .TWO & .THREE etc. on the way. Before I sign out myself I’m uploading a portion if a screenshot I took on my phone’s specifications. I hope these are helpful but (as you know from my eyes going snow blind) NUMBERS generally fly over my head (that’s why I made a REM conversion chart, I’m hopeless lol). All these pixels! So there is that.

But what led me to dig for this were a string of links that began with responsive design, traveled through typography and wound up at media query. I don’t pretend to have a clue what I’m doing but here are some of the most extraordinary links. The SmartPhone is headed for fame and on its journey I fully believe that mfgs. are going to land on a concept that will have some way of folding/sliding/attaching itself – multiple times over – to increase the pathetic screen widths in use today. Anything please dear God lol. These are keepers for newbies like me:

https://css-tricks.com/viewport-sized-typography/

https://css-tricks.com/simplified-fluid-typography/

https://w3.org/TR/css3-values/#relative-lengths

http://cssmediaqueries.com/what-are-css-media-queries.html

https://w3.org/TR/mediaqueries-4/#media-query

https://deviceatlas.com/blog/viewport-resolution-diagonal-screen-size-and-dpi-most-popular-smartphones

It’s blurred so it’s purely a guess, but that doesn’t look like a font problem. That looks to be a margin problem. That margin is too wide for the space available (looks to be almost 50% of that space).

The screen on the left is too small for me to read so I would not visit that site.

The image on the left with the correct viewport tag is readable but you have not used media queries to linearise the content in a better manner for the screen space available. You say you can’t pinch and zoom the right screenshot but without your full code I can’t say why that is. It should pinch and zoom just like normal unless you have told it not to. However there would be no need to pinch and zoom as the text should be normal size and not infinitesimally small as in the left screen.

Again you are going down a rabbit hole that doesn’t exist. :slight_smile: Nearly all modern sites behave perfectly well on mobile and are usable. I am using one now as mentioned before.

The problem you have is that you have drawn a picture of what you want and then you are trying to scale the picture smaller and smaller until it fits on your phone. (In theory that would be no better than just taking an image of the whole site and using that instead. It will be just as useful as your infinitely scaled smaller site. :slight_smile: ). That’s not how it is done. You use media queries to reorganise the content to best fit the space available.

Presently the majority of web access is already done on mobile phones. It povertook desktop some years ago and is the number one way that people interact with the web.

The solution is already here and works well. Millions of sites can’t be wrong.

I can’t seem to get the point across to you that mobiles or desktops are virtually no different from each other in the sense that the only difference is the amount of space available. I often browse with multiple windows on my desktop so your rem example is completely broken for me.

You needed to use media queries to reduce down to one column and then it would be viewed everywhere nicely.

Look at Sitepoint on your desktop and then browse on your smart phone. They both work well and forum software is one of the hardest layouts there are to linearise for mobile. They don’t look the same and neither should they. Indeed I happen to prefer most mobile layouts as they are cleaner and easier to use.

You say that you don’t care about anyone else as this is just for you but what happens when you change your phone or want to view the site on a desktop when you are out? Your current approach will not support that.

The only logical approach is to use the viewport meta tag that we gave you and to design properly so that content fits well on any screen size. That means making design decisions at appropriate breakpoints and linearising for mobile.

Here’s an html graph I did a while ago and this is what it looks like on desktop.

However when you make the screen smaller such as a mobile the media queries re order the layout to fit better and this is the result.

There’s no need to try and fit 12 bars across the screen as everything would be too small to read so the content is reorganised for the smaller screen in a much more readable and usable fashion.

Here’s another example of a table layout that can’t just be squashed smaller for mobile or small screen.

With cs and media queries and the correct meta tag small screen users get this display.

It’s the same html but just reorgansided with css.

I’m not saying it’s easy. It’s not easy to do complex things which is why people hire me to do it but for simple sites it just needs some forethought and a logical approach.

Notwithstanding all the above you are free to code what you want but the issues you will have are that you are using a feature of the browser that was really only meant to be a stop gap rendering of websites that were not created properly for mobile. It was never meant to be a perfect display. The browser just takes a guess at what it thinks might work for the site in hand. When you add the meta viewport tag we showed you then the browser understands that you will take care of the layout and won’t scale willy nilly.

There is no other way to get a cross browser layout working properly. I believe I gave you a rough start some time ago.

Which will render better on a phone (although this was a very quick rough and ready demo).

2 Likes

Paul, Everybody. Okay before you jump my bones no I did not tidy the code below and that is because I could not get the engine to cease and desist altering inline style data I have to maintain. When I couldn’t get his idiot engine to stop ruthlessly renaming styles I spent one entire day just trying manually to get the document laid out in the format I know you professionals are most comfortable working in and every goddamn time I altered anything it broke the page. I can’t have the engine rewriting my styles or creating new ones (how do people put up with this guy?). There used to be a site hosted by the original Tidy guy and he was awesome! He added absolutely nothing to your page; the only thing he did was cascade indentation – and if you wanted it he would offer to lowercase your styles that weren’t case sensitive (IDs). He added nothing, he removed nothing. So – temporary guys, just temporary. I can only stand so much of this before my brain explodes. The code below validates.

I’ve had so many people complain about my “overuse” of Latin placeholder text I decided to try something a little different: Shakespeare.

This is the first time I’ve tried this. At first I was going to go Will Lite and stick with his most popular quotes (Brevity is the soul of wit; My Horse My Horse, my Kingdom ~ etc.) but the problem is . . . I love Shakespeare so much it’s impossible to just nibble when the man is an unparalleled banquet of the best writing in the English language ever. It will more than satisfy our need to get to a Viewport design. And I can use it again.

The other thing I’m uploading is a little graphical representation of the box that used to be Style FIVE and is now rechristened as THREE. It’s hard to explain this so refer to the graphic: THREE needs to sit at the base of RNDBDR2’s border-radius container frame’s BOTTOM OUTSIDE EDGE whenever the content of COLUMN-A is deficient to place it there coincidentally. In other words: the baseline. There can be a little or a lot of data in COLUMN-A – this anchors THREE when there isn’t enough data to push it down there on its own.

If you can get me there generally I should be able to modify the pixels to get it perfect. See my graphic to understand precisely what I mean. In the event the data in COLUMN-A is really full, THREE can hang lower – much lower if necessary – than the total height of RNDBDR1. That’s okay. A short COLUMN-B is not the problem; a short COLUMN-A is. And both RNDBDRs are Flexboxes so it should be the kind of easy coding Flex was made for. THREE needs a top margin of 70px permanently. Like I said, get me there generally and I’ll fool around with the pixels to get it perfect. —s

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=1080, initial-scale=1">
<link rel="preconnect" href="https://fonts.googleapis.com"> 
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

<link href="https://fonts.googleapis.com/css2?family=Solway:wght@300;400;500;700;800&display=swap" rel="stylesheet"> 
<link href="https://fonts.googleapis.com/css2?family=Crete+Round:ital@0;1&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Extra+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;0,900;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Saira+Extra+Condensed:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Saira+Condensed:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Saira+Semi+Condensed:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">

<TITLE>VIEWPORT 99 &#7172; semicodin</TITLE>

<STYLE>

HTML, BODY {
/* not representing these as 'rems' because they are factors */
        text-size-adjust: 100%;
        font-size: 16px;     /* factor expressed in px setting the basis for rem */
        line-height: 16px;  /* factor expressed in px setting the basis for rem */
}
BODY {
        margin: 2.13rem 0 0;
        padding: 0;
        width: 100%;
        font-family: 'solway', cursive;
}
#TWOCOLUMNS {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        width: 90%;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 1.88rem;
}
#COLUMN-A {
        width: 41%;
}
#COLUMN-B {
        width: 59%;
}
#RNDBDR1 {
        border-radius: 1.56rem;
        border: .63rem solid black;
        padding: .56rem;
        width: auto;
}
#RNDBDR2 table {
        width: 100%;
        border-bottom: none;      /* DO NOT REMOVE */
}
#RNDBDR2 th {
        border-radius: .31rem .31rem 0rem 0rem;
/* TOP-LEFT + TOP-RIGHT + BOTTOM-RIGHT + BOTTOM-LEFT */
}
#RNDBDR2 tr:last-child td {
        border-bottom: none;      /* DO NOT REMOVE */
}
#RNDBDR2 {
        background-color: WHITE;
        border-radius: .63rem;
        border: .31rem SOLID BLACK;
        padding: 0rem;
        color: black;
        border-collapse: collapse;
        width: AUTO;
        margin-top: .94rem;
        margin-left: 0rem;
        margin-right: 0rem;
        font-weight: 400;
        font-family: 'Roboto Condensed', sans-serif;
}
TABLE, TH, TD {
        border-collapse: collapse;
        border-bottom: .14rem SOLID BLACK;
}
TH {
        background-color: #E3F0FF;
        border-bottom: .14rem SOLID BLACK;
        padding: .31rem;
        border-collapse: collapse;
        width: 100%;
        margin-left: 0rem;
        margin-right: 0rem;
        color: black;
        text-align: center;
        font-size: 1.63rem;
        line-height: 1.05;
        font-style: ITALIC;
        font-weight: BOLD;
        font-family: 'Crete Round', cursive;
}
TABLE .LEFTINTRO {
        padding-top: .1rem;
        text-align: CENTER;
        color: #666666;
        font-style: ITALIC;
        font-size: .81rem;
        line-height: 1;
        margin-left: 0px;
        margin-right: .13rem;
        font-weight: 400;
        font-family: 'Crete Round', cursive;
}
TABLE .LEFTCOL {
        padding-top: .1rem;
        text-align: right;
        color: #686868;
        font-size: 1.19rem;
        line-height: 1;
        margin-left: 0px;
        margin-right: .13rem;
        font-weight: 500;
        font-family: 'Roboto', sans-serif;
}
TABLE .RIGHTCOL {
        padding-top: .1rem;
        text-align: left;
        color: black;
        font-size: 1.19rem;
        line-height: 1;
        margin-right: 1rem;
        font-weight: 500;
        font-family: 'Roboto', sans-serif;
}
#INDENT {
        margin-top: .38rem;
        margin-left: .38rem;
}
img {
        padding-left: 70px;
        padding-top: 20px;   /* expressed as PX because rems not accurate! */
        padding-bottom:8px;
        width: 42px;
        height: 40px;
}
.ONE {
        text-align: left;
        margin-bottom: .75rem;
        color: #535353;
        font-size: 1.63rem;
        line-height: 1;
        font-weight: 400;
        font-family: 'Roboto', sans-serif;
}
.TWO {
        color: dodgerblue;
        text-align: left;
        margin-top: .69rem;        /* was 11px */
        margin-bottom: 4.38rem;
        font-size: 1.63rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'Fira Sans Condensed', sans-serif;
}
.THREE {
        width: 80%;
        margin-top: 70px;
        padding: .38rem .63rem .38rem .5rem;
        text-align: CENTER;
        font-style: OBLIQUE;
        background-color: MAROON;        /* #CCCCCC */
        color: WHITE;        /* #353535 */
        font-size: 1.13rem;
        line-height: 1.1;
        font-weight: 600;
        font-family: 'Fira Sans Extra Condensed', sans-serif;
}
#FOUR {
        width: 100%;
        border: none;
        color: BLACK;
        text-align: left;
        font-size: 1.22rem;
        line-height: 1.02;
        font-weight: 600;
        font-family: 'Fira Sans Extra Condensed', sans-serif;
}
#FIVE {
        width: 100%;
        border: none;
        color: BLACK;
        text-align: LEFT;
        font-size: 1.22rem;
        line-height: 1.02;
        font-weight: 600;
        font-family: 'Fira Sans Extra Condensed', sans-serif;
}
#SIX {
        width: 100%;
        border: none;
        color: BLACK;
        text-align: LEFT;
        font-size: 1.22rem;
        line-height: 1.02;
        font-weight: 600;
        font-family: 'Fira Sans Extra Condensed', sans-serif;
}
#SEVEN {
        width: 100%;
        border: none;
        color: BLACK;
        text-align: LEFT;
        font-size: 1.22rem;
        line-height: 1.02;
        font-weight: 600;
        font-family: 'Fira Sans Extra Condensed', sans-serif;
}
.EIGHT {
        margin-top: .63rem;
        margin-bottom: .93rem;
        color: #828282;
        text-align: left;
        font-size: 1.13rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'Fira Sans Condensed', sans-serif;
}
#NINE {
        margin-left: 5%;
        margin-right: 5%;
        color: BLACK;
        text-align: left;
        font-size: 1rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
#TEN {
        margin-top: 3rem;
        margin-left: 5%;
        margin-right: 5%;
        color: BLACK;
        text-align: left;
        font-size: 1rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
/* THE WITCHES! */

.MAROON {
        color: maroon;
        margin-top: 24px;
        font-size: 2.25rem;
        line-height: 1.1;
        font-weight: 800;
        font-family: 'Solway', cursive;
}
.MAROONDD {
        color: maroon;
        margin-left: 13%;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 800;
        font-family: 'Solway', cursive;
}
.ONCE {
        margin-left: 13%;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL10-5 {
        font-size: .63rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL12-5 {
        font-size: .75rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL14-5 {
        font-size: .88rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL15-5 {
        font-size: .94rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL16-5 {
        font-size: 1rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL18-5 {
        font-size: 1.13rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.GROOVYB {
        width: 100%;
        padding: 0;
        margin-top: 1.3rem;
        margin-bottom: 3rem;
        border-top: .88rem GROOVE DODGERBLUE;
}
.HILITER {
        margin-left: 4.38rem;        /* 70px */
        margin-top: 1rem;
        margin-bottom: .5rem;
        color: black;
        text-align: left;
        font-size: 1.13rem;
        line-height: 1.1;
        font-weight: 800;
        font-family: 'Fira Sans', sans-serif;
}
.HILITEY {
        background-color: #FFFFBF;
}
.DBLUE {color: DODGERBLUE}
.DBLUEA {
        color: DODGERBLUE;
        font-weight: 500;
        font-family: 'Fira SansCondensed', sans-serif;
}
.AA {
        color: #AAAAAA;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.BB {
        color: #999999;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.CC {
        color: #777777;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.DD {
        color: #555555;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.DOTTY {
        margin-left: 5%;
        margin-right: 5%;
        width: 29.5rem;
        border-bottom: .28rem DOTTED BLACK;
        color: #333333;
        text-align: left;
        margin-bottom: 1.88rem;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 700;
        font-family: 'Solway', cursive;
}
.SOL20-5 {
        margin-top: 0px;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL22-5nomar {
        margin-top: 0px;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL22-5 {
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 500;
        font-family: 'Solway', cursive;
}
.SOL22-7 {
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 700;
        font-family: 'Solway', cursive;
}
.SOL22-8 {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 800;
        font-family: 'Solway', cursive;
}
.SOL22-8DD {
        margin-left: 13%;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 800;
        font-family: 'Solway', cursive;
}
.SOL22-9 {
        margin-left: 0;
        margin-right: 0;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.02;
        font-weight: 900;
        font-family: 'Solway', cursive;
}
.SOL24-8DD {
        margin-left: 13%;
        text-align: left;
        font-size: 1.5rem;
        line-height: 1.05;
        font-weight: 800;
        font-family: 'Solway', cursive;
}
.SOL28-7 {
        font-size: 1.75rem;
        line-height: 1.05;
        font-weight: 700;
        font-family: 'Solway', cursive;
}

.FIRA700 {
        width: 100%;
        border: none;
        color: BLACK;
        text-align: LEFT;
        font-size: 1.44rem;
        line-height: .94;
        font-weight: 700;
        font-family: 'Fira Sans', sans-serif;
}
.TEXT18DD {
        margin-left: 4.38rem;        /* 70px */
        margin-bottom: .63rem;
        color: black;
        text-align: left;
        font-size: 1.13rem;
        font-weight: 400;
        line-height: 1.1;
        font-family: 'Fira Sans Condensed', sans-serif;
}
.TEXT20 {
        color: black;
        text-align: left;
        font-size: 1.25rem;
        line-height: 1.05;
        font-weight: 500;
        font-family: 'Fira Sans Condensed', sans-serif;
}
.TEXT20DD {
        margin-left: 4.38rem;        /* 70px */
        color: black;
        text-align: left;
        font-size: 1.25rem;
        line-height: 1.05;
        font-weight: 500;
        font-family: 'Fira Sans Condensed', sans-serif;
}
.TEXT20DDb {
        margin-left: 4.38rem;        /* 70px */
        color: black;
        text-align: left;
        font-size: 1.25rem;
        line-height: 1.05;
        font-weight: 700;
        font-family: 'Fira Sans Condensed', sans-serif;
}
.TEXT22 {
        color: black;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1;
        font-weight: 500;
        font-family: 'Roboto', sans-serif;
}
.TEXT22b {
        color: black;
        text-align: left;
        font-size: 1.38rem;
        line-height: 1.1;
        font-weight: BOLD;
        font-family: 'Roboto', sans-serif;
}
.TEXT24b {
        color: black;
        text-align: left;
        font-size: 1.5rem;
        line-height: 1;
        font-weight: BOLD;
        font-family: 'Roboto', sans-serif;
}
.TEXT24DDb {
        margin-left: 1.88rem;
        color: black;
        text-align: left;
        font-size: 1.5rem;
        line-height: 1;
        font-weight: BOLD;
        font-family: 'Roboto', sans-serif;
}

</STYLE>
</HEAD>

<BODY>

<div ID="TWOCOLUMNS">
<div ID="COLUMN-A">

<div class="ONE" style="margin-top: 1.57rem">&ldquo;Come, you spirits that tend on</div>

<div class="TWO">
<span style="text-decoration: underline;">
            &ldquo;Cry &lsquo;havoc!</span>&rsquo;</div>

<div class="TEXT24b">
&ldquo;But, soft! What light through<BR>
yonder window breaks?</div>
<div class="TEXT24DDb">
It is the east,<BR>
and Juliet is the sun.&rdquo;</div>

<img src="https://lh3.googleusercontent.com/mgGLyS9M0bqfqyz9uRNAZNKUX5jh2YN6HN-J2-pQj8YrjJrFnmcLB8skQVNsXl3P_djlaSBPzYr5ouc_5HsHDk6Ws-43lx5KkzViuFGsUhijtXhMzWhvTUzexNPguxgmJ089WBD8=w42-h40-p-k" alt="">

<div class="TWO">
<span style="text-decoration: underline;">
            let slip the dogs of war</span>&rdquo;</div>

<div class="TEXT24b">
&ldquo;We are such stuff<br>
as dreams are made on,</div>
<div class="TEXT24DDb">and our little life</div>
<div class="TEXT22">is rounded with a sleep.&rdquo;</div>

<div class="THREE">
&ldquo;Methought I heard a voice cry &lsquo;Sleep no more! Macbeth does murder sleep,&rsquo; the innocent sleep, sleep that knits up the ravell&rsquo;d sleeve of care, the death of each day&rsquo;s life . . . &rdquo;
</div>

</div> 	                                 <!-- CLOSING COLUMN-A -->

<div ID="COLUMN-B">        <!-- STARTING COLUMN-B -->
<div ID="RNDBDR1">          <!-- STARTING #RNDBDR1 -->

<div class="ONE" style="margin-top: 6px">mortal thoughts, unsex me here . . .&rdquo;</div>

<div class="TEXT22b">
&ldquo;Till then sit still, my soul:</div>
<div class="TEXT20">
foul deeds will rise,<BR>
though all the earth o&rsquo;erwhelm them, to men&rsquo;s eyes.&rdquo;
</div>

<div class="HILITER">
<span style="background-color: #FFFFBF">
&ldquo;O God, I could be bounded in a nutshell,<BR>
and count myself a king of infinite space,<BR>
were it not that I have bad dreams.&rdquo;</span></div>

<div class="TEXT20DD">
&ldquo;Great reason why: Lest I revenge. <span style="font-weight: 700">What, myself upon myself? Alack. I love myself.</span> Wherefore? for any good that I myself have done unto myself? <span style="font-weight: 700">O, no! alas, I rather hate myself for hateful deeds committed by myself!</div>
<div class="TEXT18DD">
I am a villain: yet I lie. I am not. <span style="color: maroon">Fool, of thyself speak well:</span> fool, do not flatter. My conscience hath a thousand several tongues, and every tongue brings in a several tale, and every tale condemns me for a villain.</div>

<TABLE ID="FOUR">
<TR><TD style="border: none">
&ldquo;As flies to wanton boys, are we to the gods. They kill us for their sport.&rdquo;
</TD>
</TR>
</TABLE>

<TABLE ID="FIVE">
<TR><TD style="border: none">
&ldquo;If you prick us, do we not <span class="DBLUEA">bleed</span>?  . . . <span class="HILITEY">If you poison us, do we not DIE?</span>&rdquo;
</TD>
</TR>
</TABLE>

<TABLE ID="SIX">
<TR><TD style="border: none">
&ldquo;I, that am rudely stamp&rsquo;d, <span class="DBLUEA">deformed</span>, unfinish&rsquo;d, scarce half made up&rdquo;
</TD>
</TR>
</TABLE>

<TABLE ID="SEVEN">
<TR><TD style="border: none">
&ldquo;What &ndash; you dote thus on such luggage? Let&rsquo;s alone and do the <span class="DBLUE">murder</span>.&rdquo;
</TD>
</TR>
</TABLE>

<div class="EIGHT">
<span class="DBLUE">
&#5150;</span>&ldquo;You taught me language; and my profit on&rsquo;t is, I know how to curse. The <span style="color:#424242">red plague rid you</span> for learning me your language!&rdquo;
</div>

<DIV ID="RNDBDR2">
 
<TABLE>
<THEAD>
<TR>
<TH colspan="2">
&ldquo;The time is out of joint: O cursed spite,<br>
That ever I was born to set it right!&rdquo;
</TH>
</TR>
</THEAD>
<TBODY>
<tr>
<td colspan="2"><div class="LEFTINTRO">
By the pricking of my thumbs, something wicked this way comes . . .</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
&nbsp;</div></td>
<td><div class="RIGHTCOL">&nbsp;</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
When shall we three</div></td>
<td><div class="RIGHTCOL">meet again?</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
In thunder, lightning,</div></td>
<td><div class="RIGHTCOL">or in rain?</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
When the hurly-burly&rsquo;s</div></td>
<td><div class="RIGHTCOL">done,</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
When the battle&rsquo;s</div></td>
<td><div class="RIGHTCOL">lost and won.</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
That will be ere</div></td>
<td><div class="RIGHTCOL">the set of sun.</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
Where the place?</div></td>
<td><div class="RIGHTCOL">Upon the heath.</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
There to meet with</div></td>
<td><div class="RIGHTCOL">Macbeth.</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
Fair is foul,</div></td>
<td><div class="RIGHTCOL">and foul is fair:</div></td>
</tr>
<tr>
<td><div class="LEFTCOL">
Hover through the fog</div></td>
<td><div class="RIGHTCOL">and filthy air.</div></td>
</tr>

</TBODY>
</TABLE>

</DIV>        <!-- CLOSING RNDBDR2 -->
</DIV>        <!-- CLOSING RNDBDR1 -->
</DIV>        <!-- CLOSING COLUMN-B -->
</DIV>        <!-- CLOSING TWOCOLUMNS -->

<div class="GROOVYB"></div>

<div ID="NINE">

<div class="SOL22-9">&ldquo;To-morrow,</div>
<div class="SOL22-7">and to-morrow,</div>
<div class="SOL22-5">
and to-morrow, creeps in this petty pace from day to day to the last syllable of recorded time, and all our yesterdays have lighted fools the way to dusty death. Out, out, brief candle! Life&rsquo;s but a walking shadow, a poor player that struts and frets his hour upon the stage and then is heard no more:
</div>
<div style="margin-top: .88rem"></div>
<div class="SOL22-8DD">
<span class="HILITEY">It is a tale told by an idiot,</span>
</DIV>            <!-- CLOSING SOL22-8DD -->

<div class="SOL24-8DD">
full of sound and fury,
</DIV>            <!-- CLOSING SOL24-8DD -->

<div class="SOL28-7">signifying nothing.&rdquo;</div>

<div style="margin-top: 24px"></div>
<div class="SOL22-5">
&ldquo;To be, or not to be: that is the question. Whether &rsquo;tis nobler in the mind to suffer the slings and arrows of outrageous fortune, or to take arms against a sea of troubles, and by opposing end them? To die: to sleep; <span style="font-weight: 800">no more</span>; and by a sleep to say we end the heart-ache and the thousand natural shocks that flesh is heir to, &rsquo;tis a consummation devoutly to be wish&rsquo;d. To die, to sleep; to sleep, perchance to dream, ay, there&rsquo;s the rub; for in that sleep of death what dreams may come when we have shuffled off this mortal coil&nbsp;.&nbsp;.&nbsp;.&rdquo;
</DIV>            <!-- CLOSING SOL22-5 -->

<div class="MAROON">&ldquo;Thrice</div>
<div class="MAROONDD">the brinded cat hath mew&rsquo;d.</div>
<div class="ONCE">
Thrice and once the hedge-pig whined. <i>Harpier cries &rsquo;tis time, &rsquo;tis time.</i>
</DIV>            <!-- CLOSING ONCE -->

<div class="WITCHES">
Round about the cauldron go; <i>in the poison&rsquo;d entrails throw.  </i>
<span class="SOL18-5">
Toad, that under cold stone days and nights has thirty-one swelter&rsquo;d venom sleeping got, <i>boil thou first i&rsquo; the charmed pot.</i> Double, double toil and trouble; <i>fire burn, and cauldron bubble.</i> </span>
<span class="SOL16-5">
Fillet of a fenny snake, <i>in the cauldron boil and bake;</i> eye of newt and toe of frog, <i>wool of bat and tongue of dog,</i> adder&rsquo;s fork and blind-worm&rsquo;s sting, <i>lizard&rsquo;s leg and owlet&rsquo;s wing,</i> </span>
<span class="SOL15-5">
for a charm of powerful trouble, <i>like a hell-broth boil and bubble.</i> 
Double, double toil and trouble; <i>fire burn and cauldron bubble.</i> Scale of dragon, tooth of wolf, <i>witches&rsquo; mummy, maw and gulf</i> </span>
<span class="SOL14-5">
&nbsp;of the ravin&rsquo;d salt-sea shark, <i>root of hemlock digg&rsquo;d i&rsquo; the dark,</i> liver of blaspheming jew, <i>gall of goat, and slips of yew</i> silver&rsquo;d in the moon&rsquo;s eclipse, <i>nose of turk and tartar&rsquo;s lips,</i> </span>
<span class="SOL12-5">
finger of birth-strangled babe ditch-deliver&rsquo;d by a drab, <i>make the gruel thick and slab:</i> Add thereto a tiger&rsquo;s chaudron, <i>for the ingredients of our cauldron.</i> </span>
<span class="SOL10-5">
Double, double toil and trouble; <i>fire burn and cauldron bubble.</i> Cool it with a baboon&rsquo;s blood, <span style="color: maroon"><i>then the charm is firm and good.&rdquo;</i></span></span>

</DIV>            <!-- CLOSING WITCHES -->
</DIV>            <!-- CLOSING NINE ID -->

<div ID="TEN">
<div class="AA">
&ldquo;The first thing we do, let&rsquo;s kill all the lawyers.&rdquo;</div>
<div class="BB">
&ldquo;Now is the winter of our discontent.&rdquo;</div>
<div class="CC">
&ldquo;Brevity is the soul of wit.&rdquo;
</div>
<div class="DD">
&ldquo;This thing of darkness I acknowledge mine.&rdquo;</div>
</DIV>            <!-- CLOSING TEN ID -->

<div class="DOTTY">
&ldquo;This above all: to thine own self be true.&rdquo;
</DIV>            <!-- CLOSING DOTTY -->

</BODY>
</HTML>

I’m going to read everything you’ve written guys but I have a screaming headache from tidying so I’ll check in tomorrow. Thank you for being patient. —semicodin

If you want the maroon box at the bottom to match the table on the right then you will need to use flex properties to get it there. You can’t just put a margin-top:70px as that doesn’t make sense if you have more (or less) content above. The 70px margin would need to be a bottom margin on the element before it and then use margin:auto on .THREE to push it to the bottom. The COLUMNA would also need to be a flex container with a direction of column in order for this to work.

You would need to do this:


#COLUMN-A {
  display: flex;
  flex-direction: column;
}
.TEXT22 {
  margin-bottom: 70px;
}
.THREE {
  margin-top: auto; /* pushes element to bottom in a flex  container*/
}

This results in this screenshot (from a desktop).

Before we go any further with this I am once again trying to push you into doing things the right way. If afterwards you still want to continue with your current approach that’s fine because that’s what you want but I will have to step out of the thread as I can’t bring myself to give advice in the wrong direction :slight_smile:

Here are my problems with your design so far.

This is what I see on a mobile when using your viewport meta tag.

That’s a real size screenshot and the result is totally unusable and impossible to read a single thing. I am not going to pinch and zoom as I don’t have the finger dexterity being 70 years old (almost) and I simply can’t read anything. It’s of zero use to me.

If that’s what you want then that’s fine for you but that is not how it is done in the real world. Again, if that’s what you want then don’t let me stop you but I just want you to know that’s not how we design these days.

Now my preference would be to use the correct viewport meta tag and get readable content and reorganise with media queries so that it works better on narrower screens. For example I would make the bordered section take up all the horizontal space and the other content moved either above or below. That gives us roughly this effect.

Everything is readable without zooming and easy to read and use.

The bottom section is now a joy to read.:slight_smile: (although I could have removed some of the gap from the right).

The above would be the way I would tackle this but of course there would be decisions about where your quotes (that were on the left) should go and what comes first etc. When designing for the web you have to basically think in multiple dimensions at the same time and code accordingly.

Lastly, on my 27" imac your original page looks like this

That is far too wide and the lines of the text at the bottom are difficult to read/scan because the line length is too long. There needs to be a max-width imposed to allow readable line lengths. (You can easily google about readable line lengths for web pages.)

I hope this is food for thought but if you still want to continue in your current direction then I wish you luck and hope you get something that works the way you want it. :slight_smile:
Whatever the outcome I believe you are making some progress so I urge to continue looking at other sites and see how the mobile and desktop displays differs so that you can get ideas for your own site.