Font-size Responsive

Asked

Viewed 162 times

0

I need a help to adjust a detail on the client site, because I’m generating some cards on the screen when registered, but as the screen resolution is not good, so, I come here to ask for your help to make the font-text size inside my card

Part of the system that generates cards with an array return

<div id="scroll" style="height: 90px; top:0px;" ng-select ng-model="selection" select-class="{'chips_style_altered': $optSelected}">
            <div  ng-repeat="frete in fretes" class="pad col-md-1">
                <div name="{{frete.frete_id}}" ng-select-option="frete" ng-click="carregarBairros(frete.frete_valor, cidade.cid_atd_id,selection)" class="col-md-12 padding-zero chips md-whiteframe-1dp" >
                    <div class="text-center" >
                        <span class="font-text">R$ {{frete.frete_valor}}</span>
                    </div>
                </div>
            </div>
        </div>

1 answer

1


The font does not respond to resizing in the browsers, it responds to the zoom in/zoom out and browser settings, so you can leave your font responsive in the browsers you must set its size according to the resolution, you can do so:

Example:

@media only screen and (max-width: 1024px) {

   body { font-size: 2em; }

}

Remember that this example decreases every source of the site according to the maximum of its width. you can set only the card to receive a smaller font.

You can also use Calc() - Can i use:

body {
  font-size: calc(0.75em + 1vmin);
}
<h1>I'm an H1 Heading</h1>

<p>Everything, it said, was against the travellers, every obstacle imposed alike by man and by nature. A miraculous agreement of the times of departure and arrival, which was impossible, was absolutely necessary to his success. He might, perhaps, reckon
  on the arrival of trains at the designated hours, in Europe, where the distances were relatively moderate; but when he calculated upon crossing India in three days, and the United States in seven, could he rely beyond misgiving upon accomplishing his
  task? There were accidents to machinery, the liability of trains to run off the line, collisions, bad weather, the blocking up by snow&mdash;were not all these against Phileas Fogg? Would he not find himself, when travelling by steamer in winter, at
  the mercy of the winds and fogs? /p>

  • Thanks Gabriel, helped me, good work, grateful, success!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.